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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f8fafc;
    color: #1e293b;
}

.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

/* Language Selector */
.language-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.language-dropdown {
    position: relative;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #334155;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.language-btn:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.language-btn .language-flag {
    font-size: 18px;
    line-height: 1;
}

.language-btn i {
    font-size: 12px;
    color: #94a3b8;
    transition: transform 0.2s;
}

.language-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease-out;
}

.language-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #334155;
    text-decoration: none;
    transition: background 0.2s;
}

.language-option:hover {
    background: #f8fafc;
}

.language-option.active {
    background: #eff6ff;
    color: #2563eb;
}

.language-option .language-flag {
    font-size: 18px;
}

.language-option .language-name {
    flex: 1;
}

.language-option i {
    color: #2563eb;
    font-size: 12px;
}

.login-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    padding: 48px;
    width: 100%;
    max-width: 440px;
}

.login-logo {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    color: white;
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    margin: 0 auto 24px;
}

.login-title {
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 8px;
}

.login-subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 32px;
}

.form-group,
.filter-group {
    margin-bottom: 20px;
}

.form-group label,
.filter-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #334155;
}

.form-group input,
.filter-group input,
.form-group textarea,
.filter-group textarea,
.form-group select,
.filter-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.filter-group input:focus,
.filter-group textarea:focus,
.filter-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #64748b;
}

.login-footer a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.sidebar {
    width: 256px;
    background: white;
    border-right: 1px solid #e2e8f0;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 40;
    /* Ensure button sits above content */
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    /* For absolute positioning of toggle btn */
}

#sidebarMinimizeBtn {
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 1px solid #e2e8f0;
    color: #64748b;
    z-index: 50;
    cursor: pointer;
}

#sidebarMinimizeBtn:hover {
    background: #f8fafc;
    color: #2563eb;
}

#sidebarMinimizeBtn i {
    font-size: 9px;
    /* Ensure icon fits nicely */
}

.sidebar-logo {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
}

.sidebar-title {
    font-size: 20px;
    font-weight: bold;
}

.sidebar-subtitle {
    font-size: 12px;
    color: #64748b;
}

.sidebar-nav {
    flex: 1;
    padding: 16px;
    overflow: auto;
}

.nav-item-group {
    margin-bottom: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: 8px;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    position: relative;
}

.nav-item:hover {
    background: #f1f5f9;
}

.nav-item.active {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    color: white;
}

.nav-item i {
    width: 20px;
}

/* Expandable menu styles */
.nav-item-expandable {
    justify-content: space-between;
}

.nav-arrow {
    transition: transform 0.3s;
    font-size: 12px;
    width: auto !important;
    margin-left: auto;
}

.nav-item-expandable.expanded .nav-arrow {
    transform: rotate(180deg);
}

.nav-submenu {
    display: none;
    padding-left: 12px;
    margin-bottom: 4px;
}

.nav-subitem {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    margin-bottom: 2px;
    border-radius: 6px;
    color: #64748b;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border-left: 2px solid transparent;
    margin-left: 20px;
}

.nav-subitem:hover {
    background: #f8fafc;
    border-left-color: #cbd5e1;
}

.nav-subitem.active {
    background: #eff6ff;
    color: #2563eb;
    border-left-color: #2563eb;
    font-weight: 500;
}

.nav-subitem i {
    width: 16px;
    font-size: 13px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid #e2e8f0;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 500;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
}

.user-role {
    font-size: 12px;
    color: #64748b;
    width: 146px;
    overflow: hidden;
}

.btn-logout {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: #fef2f2;
    color: #dc2626;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-logout:hover {
    background: #fee2e2;
}

/* Minimized Sidebar Styles */
.sidebar-minimized .sidebar {
    width: 80px;
}

.sidebar-minimized .main-content {
    margin-left: 80px;
}

.sidebar-minimized .sidebar-title,
.sidebar-minimized .sidebar-subtitle,
.sidebar-minimized .sidebar-nav .nav-item span,
.sidebar-minimized .sidebar-nav .nav-subitem span,
.sidebar-minimized .nav-arrow,
.sidebar-minimized .user-name,
.sidebar-minimized .user-role,
.sidebar-minimized .sidebar-info {
    display: none !important;
}

.sidebar-minimized .btn-logout span {
    display: none !important;
}

.sidebar-minimized .btn-logout {
    width: max-content;
    margin: auto;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    /* Ensure generic shape matches */
}

.sidebar-minimized .sidebar-header {
    padding: 24px 12px;
    justify-content: center;
    position: relative;
    flex-direction: column;
    gap: 16px;
}

.sidebar-minimized .sidebar-logo {
    margin: 0;
}

/* 
.sidebar-minimized #sidebarMinimizeBtn {
    margin: 0 !important; 
} 
Removed to allow absolute positioning to persist 
*/

.sidebar-minimized .sidebar-nav {
    padding: 16px 8px;
}

.sidebar-minimized .nav-item {
    justify-content: center;
    padding: 9px;
    width: max-content;
    margin: auto;
    margin-bottom: 4px;
}

.sidebar-minimized .nav-item i {
    width: auto;
    font-size: 16px;
    /* Slightly larger icon */
    margin: 0;
}

.sidebar-minimized .nav-subitem {
    padding: 12px;
    justify-content: center;
    margin-left: 0;
}

.sidebar-minimized .user-info {
    display: none !important;
}

.sidebar-minimized .user-profile {
    justify-content: center;
    padding: 8px;
    background: transparent;
}

.sidebar-minimized .user-avatar {
    width: 27px;
    height: 27px;
    font-size: 14px;
}

.sidebar-minimized .sidebar-footer {
    padding: 16px 8px;
}

/* Tooltip on hover for minimized state (Optional enhancement) */
/* .sidebar-minimized .nav-item:hover::after {
     content: attr(data-tooltip);
} */

.main-content {
    margin-left: 256px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.sidebar {
    transition: width 0.3s ease;
}


.header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-box {
    position: relative;
    width: 400px;
}

.search-box input {
    width: 100%;
    padding: 10px 10px 10px 40px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

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

.notification-btn {
    position: relative;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.notification-btn:hover {
    background: #f1f5f9;
}

.notification-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #dc2626;
    border-radius: 50%;
}

.page-content {
    padding: 24px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-title {
    font-size: 28px;
    font-weight: bold;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    justify-content: center;
    width: fit-content;
    text-decoration: none;
}

.btn-add {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    color: white;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s;
}

.stat-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

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

.stat-icon.blue {
    background: #dbeafe;
    color: #2563eb;
}

.stat-icon.green {
    background: #dcfce7;
    color: #16a34a;
}

.stat-icon.purple {
    background: #f3e8ff;
    color: #9333ea;
}

.stat-icon.indigo {
    background: #e0e7ff;
    color: #4f46e5;
}

.stat-change {
    color: #16a34a;
    font-size: 14px;
    font-weight: 500;
}

.stat-label {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    margin-top: 4px;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.product-item,
.alert-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 12px;
}

.alert-item {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.product-rank {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
}

.product-info {
    flex: 1;
    margin-left: 12px;
}

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

.product-sales {
    font-size: 14px;
    color: #64748b;
}

.product-revenue {
    font-size: 18px;
    font-weight: 600;
}

.alert-icon {
    color: #dc2626;
    margin-right: 12px;
}

.btn-restock {
    padding: 6px 12px;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.table-header {
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
}

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

thead {
    background: #f8fafc;
}

th {
    padding: 12px 24px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
}

td {
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
}

tr:hover {
    background: #f8fafc;
}

.product-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-emoji {
    font-size: 32px;
}

.badge {
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #dcfce7;
    color: #16a34a;
}

.badge-danger {
    background: #fee2e2;
    color: #dc2626;
}

.badge-warning {
    background: #fef3c7;
    color: #b45309;
}

.badge-secondary {
    background: #f1f5f9;
    color: #475569;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-edit {
    color: #2563eb;
    background: transparent;
}

.btn-edit:hover {
    background: #dbeafe;
}

.btn-delete {
    color: #dc2626;
    background: transparent;
}

.btn-delete:hover {
    background: #fee2e2;
}

.pos-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.product-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.product-card:hover {
    border-color: #2563eb;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.product-card-emoji {
    font-size: 48px;
    text-align: center;
    margin-bottom: 12px;
}

.product-image-wrapper {
    width: 100%;
    height: 77px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: 8px;
    background: #f8fafc;
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.product-emoji-large {
    font-size: 64px;
    text-align: center;
    margin-bottom: 12px;
}

.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.no-products i {
    color: #cbd5e1;
    margin-bottom: 16px;
}

.no-products p {
    margin: 8px 0;
}

.no-products .text-muted {
    font-size: 14px;
    color: #94a3b8;
}

.product-card-name {
    font-weight: 600;
    text-align: center;
    margin-bottom: 4px;
}

.product-card-category {
    font-size: 12px;
    color: #64748b;
    text-align: center;
    margin-bottom: 8px;
}

.product-card-price {
    font-size: 18px;
    font-weight: bold;
    color: #2563eb;
    text-align: center;
}

.product-card-stock {
    font-size: 12px;
    color: #64748b;
    text-align: center;
    margin-top: 4px;
}

.cart-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 24px;
}

.cart-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 16px;
}

.cart-items {
    max-height: 300px;
    min-height: 150px;
    overflow-y: auto;
    margin-bottom: 24px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 12px;
    gap: 12px;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 500;
    margin-bottom: 4px;
    font-size: 14px;
}

.cart-item-price {
    font-size: 12px;
    color: #64748b;
    margin: 0;
}

.cart-item-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border-radius: 6px;
    padding: 4px;
    border: 1px solid #e2e8f0;
}

.qty-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: #f1f5f9;
    color: #475569;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: #2563eb;
    color: white;
}

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

.qty-display {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

.cart-item-total {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-item-total strong {
    font-size: 14px;
    color: #2563eb;
}

.remove-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s;
}

.remove-btn:hover {
    background: #dc2626;
    color: white;
}

.empty-cart {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}

.empty-cart i {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 12px;
}

.empty-cart p {
    margin: 0;
    font-size: 14px;
}

.delivery-section {
    background: #f8fafc;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
}

.delivery-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #475569;
}

.delivery-header i {
    color: #2563eb;
}

.delivery-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.delivery-section .form-group {
    margin-bottom: 12px;
}

.delivery-section .form-group:last-child {
    margin-bottom: 0;
}

.delivery-section label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 6px;
}

.delivery-section .form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.delivery-section .form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.delivery-section textarea.form-control {
    resize: vertical;
    min-height: 60px;
}


.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 60px;
}

.cart-totals {
    border-top: 1px solid #e2e8f0;
    padding-top: 16px;
    margin-bottom: 24px;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #64748b;
}

.cart-grand-total {
    display: flex;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    font-size: 20px;
    font-weight: bold;
}

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-payment {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    color: white;
}

.btn-clear {
    background: #f1f5f9;
    color: #475569;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.15s ease-out, background 0.15s ease-out;
}

/* Modal visible state - triggered by .show class */
.modal.show {
    opacity: 1;
    background: rgba(0, 0, 0, 0.5);
}

/* For backward compatibility with existing code */
.modal.active {
    display: flex;
    opacity: 1;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 624px;
    padding: 32px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(-20px);
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animate content when modal has .show class */
.modal.show .modal-content,
.modal.active .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Closing animation */
.modal.closing {
    opacity: 0;
    background: rgba(0, 0, 0, 0);
}

.modal.closing .modal-content {
    transform: scale(0.9) translateY(-20px);
    opacity: 0;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-title {
    font-size: 24px;
    font-weight: bold;
}



.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 24px;
    color: #64748b;
    transition: color 0.2s, transform 0.2s;
}

.payment-amount {
    padding: 16px;
    background: #dbeafe;
    border-radius: 8px;
    margin-bottom: 24px;
}

.payment-amount-label {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 4px;
}

.payment-amount-value {
    font-size: 32px;
    font-weight: bold;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-method:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.payment-icon {
    font-size: 24px;
    width: 32px;
    text-align: center;
}

.payment-icon.blue {
    color: #2563eb;
}

.payment-icon.green {
    color: #16a34a;
}

.payment-icon.purple {
    color: #9333ea;
}

.payment-info {
    flex: 1;
}

.payment-name {
    font-weight: 500;
    margin-bottom: 2px;
}

.payment-desc {
    font-size: 14px;
    color: #64748b;
}

.receipt-header {
    text-align: center;
    margin-bottom: 24px;
}

.receipt-logo {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    color: white;
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    margin: 0 auto 16px;
}

.receipt-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
}

.receipt-address {
    color: #64748b;
    margin-bottom: 8px;
}

.receipt-number {
    font-size: 14px;
    color: #64748b;
}

.receipt-items {
    border-top: 2px dashed #cbd5e1;
    border-bottom: 2px dashed #cbd5e1;
    padding: 16px 0;
    margin-bottom: 16px;
}

.receipt-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.receipt-item-name {
    color: #64748b;
}

.receipt-item-price {
    font-weight: 500;
}

.receipt-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.btn-print {
    flex: 1;
    background: #2563eb;
    color: white;
}

.btn-pdf {
    flex: 1;
    background: #f1f5f9;
    color: #475569;
}

.hidden {
    display: none;
}

@media (max-width: 1110px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

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

    .search-box {
        width: 100%;
    }
}

/* Additional Styles for New Components */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.btn-outline {
    background: white;
    border: 2px solid #2563eb;
    color: #2563eb;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: #eff6ff;
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-danger {
    background: #dc2626;
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-icon {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon.btn-edit {
    color: #2563eb;
}

.btn-icon.btn-edit:hover {
    background: #eff6ff;
}

.btn-icon.btn-delete {
    color: #dc2626;
}

.btn-icon.btn-delete:hover {
    background: #fee;
}

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

.product-emoji {
    font-size: 24px;
}

.product-emoji-large {
    font-size: 48px;
    text-align: center;
    margin-bottom: 12px;
}

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

.action-buttons {
    display: flex;
    gap: 8px;
}

.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #dcfce7;
    color: #16a34a;
}

.badge-danger {
    background: #fee2e2;
    color: #dc2626;
}

.badge-primary {
    background: #dbeafe;
    color: #2563eb;
}

.badge-info {
    background: #e0e7ff;
    color: #4f46e5;
}

.font-semibold {
    font-weight: 600;
}

.text-muted {
    color: #64748b;
    font-size: 12px;
}

.pos-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.pos-products {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.pos-header {
    display: flex;
    align-items: flex-start;
    gap: 0px;
    flex-direction: column;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.pos-cart {
    position: sticky;
    top: 24px;
    height: fit-content;
}

.cart-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
}

.cart-summary {
    border-top: 1px solid #e2e8f0;
    padding-top: 16px;
    margin-top: 16px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #64748b;
}

.summary-total {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
}

.cart-actions {
    margin-top: 13px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.expenses-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.expense-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
}

.expense-info {
    flex: 1;
}

.expense-info strong {
    display: block;
    margin-bottom: 4px;
    color: #1e293b;
}

.expense-info p {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 4px;
}

.expense-amount {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.expense-amount.negative {
    color: #dc2626;
}

.top-products {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.top-product-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
}

.top-product-rank {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
}

.top-product-info {
    flex: 1;
}

.top-product-info strong {
    display: block;
    color: #1e293b;
    margin-bottom: 4px;
}

.top-product-info small {
    color: #64748b;
    font-size: 14px;
}

.top-product-revenue {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.low-stock-alerts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 8px;
}

.alert-item i {
    color: #dc2626;
    font-size: 20px;
}

.alert-info {
    flex: 1;
}

.alert-info strong {
    display: block;
    color: #1e293b;
    margin-bottom: 4px;
}

.alert-info small {
    color: #64748b;
    font-size: 14px;
}

.category-stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.category-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-bar-container {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.category-bar {
    height: 100%;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    border-radius: 4px;
    transition: width 0.3s;
}

.category-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-direction: column;
}

.category-info span {
    color: #64748b;
}

.category-info strong {
    color: #1e293b;
}

.logo-upload {
    display: flex;
    align-items: center;
    gap: 16px;
}

.current-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
}

.users-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
}

.user-avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.user-avatar-circle.blue {
    background: #2563eb;
}

.user-avatar-circle.green {
    background: #16a34a;
}

.user-avatar-circle.purple {
    background: #7c3aed;
}

.user-details {
    flex: 1;
}

.user-details strong {
    display: block;
    color: #1e293b;
    margin-bottom: 4px;
}

.user-details small {
    color: #64748b;
    font-size: 14px;
}

.user-actions {
    display: flex;
    gap: 8px;
}

/* Goods Subcategories List */
.subcategories-list {
    padding: 0 20px 20px;
}

.subcategory-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    margin-bottom: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.subcategory-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.subcategory-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.form-footer {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
}

.modal-footer {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.modal-sm {
    max-width: 480px;
}

.payment-amount {
    background: #eff6ff;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 24px;
}

.payment-amount p {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 8px;
}

.payment-amount h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.payment-method-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    width: 100%;
}

.payment-method-btn:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.payment-method-btn.marketplace {
    border-color: #e0e7ff;
    background: #f5f7ff;
}

.payment-method-btn.marketplace:hover {
    border-color: #6366f1;
    background: #eef2ff;
}

.payment-method-btn.marketplace i {
    color: #6366f1;
}

.payment-method-btn i {
    font-size: 24px;
    color: #2563eb;
}

.payment-method-btn strong {
    display: block;
    color: #1e293b;
    margin-bottom: 4px;
    font-size: 15px;
}

.payment-method-btn p {
    color: #64748b;
    font-size: 13px;
    margin: 0;
    line-height: 1.4;
}

.payment-section-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.payment-section-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #e2e8f0;
}

.payment-section-divider span {
    background: white;
    padding: 0 12px;
    position: relative;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.receipt-header {
    text-align: center;
    margin-bottom: 24px;
}

.receipt-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    margin: 0 auto 16px;
}

.receipt-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.receipt-header p {
    color: #64748b;
    font-size: 14px;
}

.receipt-summary {
    margin-bottom: 24px;
}

@media (max-width: 768px) {

    .pos-container,
    .products-grid {
        grid-template-columns: 1fr;
    }

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

    .grid-2,
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Margin classes */
.m-0 {
    margin: 0;
}

.m-1 {
    margin: 4px;
}

.m-2 {
    margin: 8px;
}

.m-3 {
    margin: 12px;
}

.m-4 {
    margin: 16px;
}

.m-5 {
    margin: 20px;
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 4px;
}

.mt-2 {
    margin-top: 8px;
}

.mt-3 {
    margin-top: 12px;
}

.mt-4 {
    margin-top: 16px;
}

.mt-5 {
    margin-top: 20px;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 4px;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-3 {
    margin-bottom: 12px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-5 {
    margin-bottom: 20px;
}

.ml-0 {
    margin-left: 0;
}

.ml-1 {
    margin-left: 4px;
}

.ml-2 {
    margin-left: 8px;
}

.ml-3 {
    margin-left: 12px;
}

.ml-4 {
    margin-left: 16px;
}

.ml-5 {
    margin-left: 20px;
}

.mr-0 {
    margin-right: 0;
}

.mr-1 {
    margin-right: 4px;
}

.mr-2 {
    margin-right: 8px;
}

.mr-3 {
    margin-right: 12px;
}

.mr-4 {
    margin-right: 16px;
}

.mr-5 {
    margin-right: 20px;
}

/* Padding classes */
.p-0 {
    padding: 0;
}

.p-1 {
    padding: 4px;
}

.p-2 {
    padding: 8px;
}

.p-3 {
    padding: 12px;
}

.p-4 {
    padding: 16px;
}

.p-5 {
    padding: 20px;
}

.pt-0 {
    padding-top: 0;
}

.pt-1 {
    padding-top: 4px;
}

.pt-2 {
    padding-top: 8px;
}

.pt-3 {
    padding-top: 12px;
}

.pt-4 {
    padding-top: 16px;
}

.pt-5 {
    padding-top: 20px;
}

.pb-0 {
    padding-bottom: 0;
}

.pb-1 {
    padding-bottom: 4px;
}

.pb-2 {
    padding-bottom: 8px;
}

.pb-3 {
    padding-bottom: 12px;
}

.pb-4 {
    padding-bottom: 16px;
}

.pb-5 {
    padding-bottom: 20px;
}

.pl-0 {
    padding-left: 0;
}

.pl-1 {
    padding-left: 4px;
}

.pl-2 {
    padding-left: 8px;
}

.pl-3 {
    padding-left: 12px;
}

.pl-4 {
    padding-left: 16px;
}

.pl-5 {
    padding-left: 20px;
}

.pr-0 {
    padding-right: 0;
}

.pr-1 {
    padding-right: 4px;
}

.pr-2 {
    padding-right: 8px;
}

.pr-3 {
    padding-right: 12px;
}

.pr-4 {
    padding-right: 16px;
}

.pr-5 {
    padding-right: 20px;
}

/* Toggle Switch Styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked+.toggle-slider {
    background-color: #2563eb;
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(24px);
}

.toggle-switch input:focus+.toggle-slider {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Setting Group Styles */
.setting-group {
    margin-bottom: 24px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.setting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.setting-group:has(.setting-content[style*="display: block"]) .setting-header {
    margin-bottom: 16px;
}

.toggle-label {
    font-weight: 600;
    font-size: 15px;
    color: #1e293b;
    margin: 0;
}

.setting-description {
    font-size: 13px;
    color: #64748b;
    margin: 4px 0 0 0;
}

.setting-content {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.setting-content .form-group {
    margin-bottom: 0;
}

.form-text {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #64748b;
}

.payment-methods-section {
    margin-bottom: 32px;
}

.payment-methods-section:last-child {
    margin-bottom: 0;
}

.section-subtitle {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.card-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 4px 0 0 0;
    font-weight: 400;
}

/* Header Logo Styles */
.header-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}

.header-logo-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    border: 2px solid #e2e8f0;
}

/* Toast Notification Styles */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 320px;
    z-index: 10000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    border-left: 4px solid #10b981;
}

.toast-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-icon {
    width: 40px;
    height: 40px;
    background: #d1fae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-icon i {
    color: #10b981;
    font-size: 20px;
}

.toast-content {
    flex: 1;
}

.toast-title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.toast-message {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

/* Thermal Print Styles */
@media print {
    body * {
        visibility: hidden;
    }

    #thermalPrint,
    #thermalPrint * {
        visibility: visible;
    }

    #thermalPrint {
        position: absolute;
        left: 0;
        top: 0;
        width: 80mm;
    }
}

.thermal-receipt {
    font-family: 'Courier New', monospace;
    width: 80mm;
    max-width: 80mm;
    margin: 0 auto;
    padding: 10mm;
    background: white;
}

.thermal-receipt h2 {
    text-align: center;
    font-size: 18px;
    margin-bottom: 5px;
}

.thermal-receipt .shop-info {
    text-align: center;
    font-size: 12px;
    margin-bottom: 10px;
}

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

.thermal-receipt .receipt-info {
    font-size: 11px;
    margin-bottom: 10px;
}

.thermal-receipt .item-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 3px;
}

.thermal-receipt .total-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: bold;
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid #000;
}

.thermal-receipt .footer {
    text-align: center;
    font-size: 11px;
    margin-top: 15px;
}

/* Expense Page Styles */
.expenses-list {
    max-height: 600px;
    overflow-y: auto;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-lg {
    max-width: 900px;
}

.form-text {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 13px;
}

input[type="color"] {
    height: 45px;
    padding: 5px;
    cursor: pointer;
}

/* POS Filters */
.filter-section {
    padding: 0 20px 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* Added more gap between rows */
    background: #f8f9fa;
    border-bottom: 1px solid #e2e8f0;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Category Filters - Horizontal Scroll */
.category-filters {
    overflow-x: auto;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
    white-space: nowrap;
    /* Prevent wrapping */
    flex-wrap: nowrap;
    /* Ensure single line */
}

.category-filters::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari/Webkit */
}

/* Goods Type Dropdown */
.type-dropdown-container {
    position: relative;
    max-width: 250px;
    width: 100%;
}

.type-select {
    width: 100%;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background-color: white;
    color: #334155;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    /* Remove default arrow */
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.type-select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Filter Pills (Categories) */
.filter-pill {
    white-space: nowrap;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    /* Prevent shrinking in flex container */
}

.filter-pill:hover {
    background: #f1f5f9;
    color: #334155;
}

.filter-pill.active {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}

.filter-pill i {
    font-size: 0.8em;
}

/* Adjust POS header to remove bottom padding/margin if filters are present */
.pos-header {
    margin-bottom: 0 !important;
    padding-bottom: 15px;
    border-bottom: none !important;
}

/* Ensure products grid takes remaining height */
.pos-products {
    display: flex;
    flex-direction: column;
}

.products-grid {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.required {
    color: #e74c3c;
}

/* Responsive Sidebar & Navbar */
.mobile-only {
    display: none !important;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 992px) {
    .mobile-only {
        display: inline-flex !important;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        z-index: 1000;
        box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
    }

    .sidebar.active {
        transform: translateX(0);
    }

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

    .pos-grid,
    .pos-container {
        display: flex;
        flex-direction: column;
        height: auto !important;
    }

    .pos-cart {
        order: 2;
        /* Cart below products */
        position: static;
        /* Remove sticky if needed, or keep it */
        width: 100%;
    }

    .sidebar-overlay {
        z-index: 999;
    }

    .pos-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
    }

    .pos-header .header-actions {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .pos-header .header-actions .search-box {
        width: 100%;
        margin-top: 10px;
    }
}

/* ========================================
   GLOBAL TOAST NOTIFICATION SYSTEM
   ======================================== */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 320px;
    max-width: 450px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 14px;
    z-index: 99999;
    transform: translateX(calc(100% + 40px));
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid #10b981;
}

.toast-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-notification .toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-notification .toast-icon i {
    color: white;
    font-size: 18px;
}

.toast-notification .toast-body {
    flex: 1;
    min-width: 0;
}

.toast-notification .toast-title {
    font-weight: 600;
    font-size: 15px;
    color: #1e293b;
    margin-bottom: 2px;
}

.toast-notification .toast-message {
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
    word-wrap: break-word;
}

.toast-notification .toast-close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s;
    flex-shrink: 0;
    margin-left: auto;
}

.toast-notification .toast-close:hover {
    background: #f1f5f9;
    color: #64748b;
}

/* Toast Types */
.toast-notification.error {
    border-left-color: #ef4444;
}

.toast-notification.error .toast-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.toast-notification.warning {
    border-left-color: #f59e0b;
}

.toast-notification.warning .toast-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.toast-notification.info {
    border-left-color: #3b82f6;
}

.toast-notification.info .toast-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* Mobile responsive */
@media (max-width: 480px) {
    .toast-notification {
        left: 10px;
        right: 10px;
        min-width: 0;
        max-width: none;
    }
}

/* -------------------------------------------------------------------------- */
/* UTILITY CLASSES                                                           */
/* -------------------------------------------------------------------------- */

/* Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -12px;
    margin-left: -12px;
}

.g-3 {
    margin-right: -8px;
    margin-left: -8px;
}

.g-3>[class*="col-"] {
    padding-right: 8px;
    padding-left: 8px;
}

[class*="col-"] {
    position: relative;
    width: 100%;
    padding-right: 12px;
    padding-left: 12px;
}

/* Columns for different screen sizes */
.col-12 {
    width: 100%;
}

@media (min-width: 576px) {
    .col-sm-6 {
        width: 50%;
    }

    .col-sm-12 {
        width: 100%;
    }
}

@media (min-width: 768px) {
    .col-md-2 {
        width: 16.666667%;
    }

    .col-md-3 {
        width: 25%;
    }

    .col-md-4 {
        width: 33.333333%;
    }

    .col-md-6 {
        width: 50%;
    }

    .col-md-12 {
        width: 100%;
    }
}

@media (min-width: 992px) {
    .col-lg {
        flex: 1 0 0%;
    }

    .col-lg-2 {
        width: 16.666667%;
    }

    .col-lg-3 {
        width: 25%;
    }

    .col-lg-4 {
        width: 33.333333%;
    }
}

/* Spacing Helpers */
.mb-0 {
    margin-bottom: 0 !important;
}

.mb-1 {
    margin-bottom: 0.25rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mt-1 {
    margin-top: 0.25rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mr-1 {
    margin-right: 0.25rem !important;
}

.mr-2 {
    margin-right: 0.5rem !important;
}

.p-0 {
    padding: 0 !important;
}

.p-1 {
    padding: 0.25rem !important;
}

.p-2 {
    padding: 0.5rem !important;
}

.p-3 {
    padding: 1rem !important;
}

.p-4 {
    padding: 1.5rem !important;
}

/* Text & Alignment */
.text-left {
    text-align: left !important;
}

.text-center {
    text-align: center !important;
}

.text-right {
    text-align: right !important;
}

.fw-bold {
    font-weight: 700 !important;
}

.small {
    font-size: 0.875em !important;
}

/* Form Helpers */
.form-label {
    display: block;
    margin-bottom: 0.5rem;
}

.align-items-end {
    align-items: flex-end !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.d-flex {
    display: flex !important;
}

/* Utility Classes for Text Colors */
.text-danger {
    color: #dc2626 !important;
}

.text-success {
    color: #16a34a !important;
}

.text-warning {
    color: #d97706 !important;
}

.text-info {
    color: #2563eb !important;
}

.text-muted {
    color: #94a3b8 !important;
}

.font-weight-bold {
    font-weight: 700 !important;
}

/* Additional Button Utility Classes */
.btn-info {
    background: #0ea5e9;
    color: white;
}

.btn-info:hover {
    background: #0284c7;
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

/* Layout Utilities */
.gap-2 {
    gap: 0.5rem !important;
}

.shrink-0 {
    flex-shrink: 0 !important;
}

.flex-grow-1 {
    flex-grow: 1 !important;
}


/* Scroll Snap Pagination */
.products-grid-paged {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    gap: 0;
    /* No gap between pages */
    scrollbar-width: none;
    /* Firefox */
}

.products-grid-paged::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.products-page {
    min-width: 100%;
    scroll-snap-align: start;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, auto);
    gap: 16px;
    padding: 4px;
}

/* Empty Cart State */
.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #94a3b8;
}

.empty-cart i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #cbd5e1;
}

.empty-cart p {
    font-size: 16px;
    margin: 0;
    font-weight: 500;
}


.flex-direction-row {
    flex-direction: row !important;
}

/* Visibility Utilities */
@media (max-width: 991.98px) {
    .desktop-only {
        display: none !important;
    }
}

@media (min-width: 992px) {
    .mobile-only {
        display: none !important;
    }
}