/* --- Global Variables & Reset --- */
:root {
    /* Amiresto Color Palette */
    --bg-main: #F8F9FA;      /* ??? ????? ?????? ?????? */
    --bg-card: #FFFFFF;      /* ??? ????? ???????? */
    --primary-orange: #FF6B35; /* ????????? ?????? ????????? ???????? */
    --secondary-teal: #00B4D8; /* ????? ?????? ??????? ??????? ?????? */
    --text-dark: #1F222B;    /* ?????? ???????? */
    --text-muted: #8A94A6;   /* ?????? ???????? */
    
    /* Status Colors */
    --status-success: #2EC4B6; /* ???? */
    --status-warning: #FFB703; /* ????/??????? ???? */
    --status-danger: #E71D36;  /* ???? */

    /* Dimensions & Spacing */
    --radius-xl: 24px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --pad-std: 20px;
    --bottom-nav-height: 70px;
}

:root {
    /* ?????? ??????: ????? ???????? ????? */
    --primary-blue: #007AFF; 
    --primary-light: #E5F2FF;
    --bg-main: #F4F7FA;
    --bg-card: #FFFFFF;
    --text-dark: #1C1C1E;
    --text-muted: #8E8E93;
    
    /* ????? ?????? */
    --status-success: #34C759;
    --status-warning: #FF9500;
    --status-danger: #FF3B30;

    --radius-lg: 14px;
    --radius-md: 10px;
}

/* ????? ??????? ?? ????? ?????? */
[data-theme="dark"] {
    --bg-main: #000000;
    --bg-card: #1C1C1E;
    --text-dark: #FFFFFF;
    --text-muted: #8E8E93;
    --primary-blue: #0A84FF;
    --primary-light: rgba(10, 132, 255, 0.15);
}

* {
    margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent;
}

body {
    font-family: arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-dark);
    /* ????? ?????? ?? ?????? ??? ?? ???? ????? ??? ??????? */
    padding-bottom: calc(var(--bottom-nav-height) + 30px); 
    line-height: 1.5;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- Typography Utilities --- */
h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 600; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary-orange); }

/* --- Components --- */
.btn-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--bg-card);
    color: var(--text-dark);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: transform 0.2s ease;
}
.btn-icon:active { transform: scale(0.95); }

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px; font-weight: 600;
    display: inline-flex; align-items: center; gap: 5px;
}
.badge.online { background: rgba(46, 196, 182, 0.1); color: var(--status-success); }

/* --- Layout Sections --- */
.app-header {
    padding: var(--pad-std); padding-top: 50px;
    display: flex; justify-content: space-between; align-items: center;
}

.app-container { padding: 0 var(--pad-std); }

/* --- Hero Stats Cards --- */
.stats-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 20px rgba(0,0,0,0.04);
    display: flex; flex-direction: column;
    position: relative; overflow: hidden;
    height: 140px; justify-content: space-between;
}

/* ????? ????? ????? ???????? */
.stat-card::after {
    content: ''; position: absolute; right: -10px; bottom: -10px;
    font-family: "Font Awesome 6 Free"; font-weight: 900;
    font-size: 80px; opacity: 0.06; z-index: 0;
}
.stat-card.orders::after { content: '\f201'; color: var(--primary-orange); } /* Chart icon */
.stat-card.sales::after { content: '\f555'; color: var(--secondary-teal); } /* Wallet icon */

.stat-icon { font-size: 1.5rem; margin-bottom: 15px; z-index: 1; }
.stat-value { font-size: 26px; font-weight: 800; color: var(--text-dark); line-height: 1.2; z-index: 1; }
.stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; z-index: 1; }

/* --- Section Header --- */
.section-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 15px;
}
.view-all-link { color: var(--secondary-teal); font-size: 14px; font-weight: 600; }

/* --- Order Cards (The Modern Look) --- */
.order-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px; margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border-left: 4px solid transparent; /* ?????? ?????? ??????? */
    transition: all 0.2s ease; cursor: pointer;
    position: relative;
}
.order-card:active { transform: scale(0.98); }

/* ????? ????? ???????? */
.order-card[data-status="pending"],
.order-card[data-status="cooking"] { border-left-color: var(--status-warning); }
.order-card[data-status="ready"],
.order-card[data-status="completed"] { border-left-color: var(--status-success); }
.order-card[data-status="delayed"] { border-left-color: var(--status-danger); }

.order-card-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px;
}
.order-id { font-weight: 700; font-size: 15px; }
.order-type { font-weight: 400; font-size: 12px; color: var(--text-muted); margin-left: 5px; }
.timer-badge {
    font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 8px;
    display: flex; align-items: center; gap: 5px;
}

.order-card-body {
    margin-bottom: 15px; padding-bottom: 15px;
    border-bottom: 1px dashed #eee;
}
.customer-name { font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--text-dark); }
.items-summary { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.items-summary b { color: var(--text-dark); font-weight: 500; }

.order-card-footer {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 13px; font-weight: 600;
}
.order-price { font-size: 16px; font-weight: 800; color: var(--text-dark); }

/* --- Glassmorphism Bottom Nav --- */

/* --- ????? ????? ???? ?????? ?????? --- */
/* --- ??????? ????????? (????? ??????) --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 85px;
    background: rgba(255, 255, 255, 0.85); /* ????? ????? ????? */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 2000;
    transition: background 0.3s ease, border-color 0.3s ease;
}

/* --- ????? ????? ?????? (Dark Mode) --- */
[data-theme="dark"] .bottom-nav {
    background: rgba(28, 28, 30, 0.85); /* ????? ?????? ????? ???? (iOS Style) */
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* ?? ???? ???? ???? ????? */
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4); /* ?? ???? ?????? ?????? ?? ??????? ?????? */
}

/* ????? ????? ?????? ??? ?????? ?? ????? ?????? */
[data-theme="dark"] .nav-item {
    color: #8E8E93; /* ??? ????? ???? ?????? ??????? ??? ??????? ??????? */
}

/* ?????? ?? ???? ????? ?????? ????? ?? ????? ?????? */
[data-theme="dark"] .nav-item.active {
    color: var(--primary-blue) !important;
    text-shadow: 0 0 10px rgba(0, 122, 255, 0.3); /* ???? ???? ???????? ?????? */
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px; /* ????? ??????? ??? ???????? ????? */
    text-decoration: none;
    color: var(--text-muted);
    transition: all 0.3s ease;
    flex: 1;
}

/* ????? ??? ????????? */
.nav-item i {
    font-size: 24px; /* ????? ?????? ??? ?????? ??? 18-20px */
}

/* ????? ??? ????? ????????? */
.nav-item span {
    font-size: 13px; /* ????? ?????? ??? 10-11px */
    font-weight: 700; /* ??? ???? ?????? ?????? ??????? */
}

/* ????? ???????? ?????? */
.nav-item.active {
    color: var(--primary-blue) !important;
    transform: translateY(-2px);
}

/* ????? ??? ???? ?????? ??????? (FAB) */
.nav-fab {
    width: 60px;
    height: 60px;
    font-size: 26px;
    background: var(--primary-blue);
    color: white;
    border-radius: 50%;
    border: none;
    box-shadow: 0 8px 20px rgba(0, 122, 255, 0.3);
    cursor: pointer;
}



.nav-fab:active { transform: scale(0.95); }

/* --- Loading & States --- */
.loader { text-align: center; padding: 40px; color: var(--text-muted); }
.empty-state { text-align: center; padding: 40px; color: var(--text-muted); }
.empty-state i { font-size: 40px; opacity: 0.3; margin-bottom: 15px; }

/* --- Enhanced Header Design --- */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 45px 20px 15px 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Logo & Branch Styling */
.logo-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.app-logo {
    height: 28px; /* ???? ????? ??? ????? */
    width: auto;
    object-fit: contain;
}

.branch-pill {
    background: rgba(46, 196, 182, 0.1);
    color: var(--status-success);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
}

.branch-pill .dot {
    width: 6px;
    height: 6px;
    background-color: var(--status-success);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--status-success);
}

/* Dark Mode Toggle Customization */
.theme-btn {
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}

.sun-icon { display: none; color: #FFB703; }

[data-theme="dark"] .moon-icon { display: none; }
[data-theme="dark"] .sun-icon { display: block; }

/* User Profile Photo Styling */
.user-profile {
    position: relative;
    width: 42px;
    height: 42px;
}

.user-photo {
    width: 100%;
    height: 100%;
    border-radius: 12px; /* ????? ??????? ???????? ??????? */
    object-fit: cover;
    border: 2px solid var(--white);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.online-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: var(--status-success);
    border: 2px solid var(--white);
    border-radius: 50%;
}


/* ????? ?????? ?????? */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 20px 15px 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ???? ????? */
.branch-pill {
    background: rgba(46, 196, 182, 0.1);
    color: #2ec4b6;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
}

/* ?? ?????? ??? */
.theme-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: var(--bg-card);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    cursor: pointer;
}

.sun-icon { display: none; color: #ffb703; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="dark"] .sun-icon { display: block; }

/* ???? ???????? */
.user-profile {
    position: relative;
    width: 42px;
    height: 42px;
}

.user-photo {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.online-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: #2ec4b6;
    border: 2px solid white;
    border-radius: 50%;
}

/* ???? ??????? */
/* ????? ??? ??????? ?????? */
.welcome-section {
    padding: 10px 20px; /* ????? ????? ?????? ??? ??? ???? ?????? */
}

.welcome-section h2 {
    font-size: 18px; /* ????? ????? ?? 24px ??? 18px ????? ???? ??????? */
    font-weight: 700;
    margin: 0;
    color: var(--text-dark);
}

/* --- ????? ????? ?????? --- */
[data-theme="dark"] {
    --bg-main: #121212;       /* ????? ????? ???? */
    --bg-card: #1E1E1E;       /* ????? ???????? ????? ???? */
    --text-dark: #FFFFFF;     /* ???? ????? */
    --text-muted: #A0A0A0;    /* ???? ?????? ?????? ????? */
    
    /* ????? ?????? ?????? ?????? ??? ?? ????? ?????? */
    --header-bg: rgba(30, 30, 30, 0.8);
    --border-glass: rgba(255, 255, 255, 0.1);
}

/* ????? ??????? ?? ????? ?????? */
[data-theme="dark"] {
    --bg-main: #000000;
    --bg-card: #1C1C1E;
    --text-dark: #FFFFFF;
    --text-muted: #8E8E93;
    --primary-blue: #0A84FF;
    --primary-light: rgba(10, 132, 255, 0.15);
}


/* ????? ????? ????? ??? ????? ????? */
body {
    background-color: var(--bg-main);
    color: var(--text-dark);
    transition: background-color 0.3s ease, color 0.3s ease;
	padding-bottom: 90px !important; /* ????? ????? ??? ??? bottom-nav */
}

/* ????? ?????? ??????? ??????? ????? */
.app-header {
    background: var(--header-bg, rgba(255, 255, 255, 0.8));
    border-bottom: 1px solid var(--border-glass, rgba(0, 0, 0, 0.05));
}

/* ????? ?????? ????? ?? ????? ??????? ??????? ????? ?? ????? ?????? */
.sun-icon { display: none; color: #FFB703; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="dark"] .sun-icon { display: block; }

/* ?????? ?????????? (Hero Stats) */
.stat-card {
    background: var(--bg-card);
    padding: 12px 16px; /* ????? ????? ?????? ???????? */
    border-radius: var(--radius-lg);
    height: 100px; /* ????? ?????? ???? ??? ?? ?????? */
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid rgba(0,0,0,0.02);
}

.stat-icon {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 20px; /* ????? ???? ?????? ??????? ?? ???????? */
    font-weight: 800;
}

/* ?????? ??????? (Order Cards) */
.order-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 12px 14px; /* ????? ????? */
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px; /* ????? ???????? ??? ??????? ???????? */
    border-left: 4px solid var(--primary-blue);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.order-card-header {
    margin-bottom: 0; /* ????? ?????? ?????? */
}

.order-card-body {
    margin-bottom: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* ???? ?????? (FAB) ?????? ?????? */
.nav-fab {
    background: var(--primary-blue);
    box-shadow: 0 6px 16px rgba(0, 122, 255, 0.3);
}

/* ????? ???? ??????? ???????? ?? ??? POS */
.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(0,0,0,0.03);
    transition: all 0.2s ease;
}

.product-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius-md);
    background: var(--bg-main); /* ??? ????? ?? ??? ?? ???? ?????? */
}

.product-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-dark);
    margin-top: 5px;
}

.product-price {
    color: var(--primary-blue);
    font-weight: 800;
    font-size: 15px;
}



/* --- Modern POS Search Bar --- */
.search-container {
    padding: 10px 0;
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-main);
}

.search-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 2px solid rgba(0, 122, 255, 0.1); /* ???? ????? ????? ?????? */
    border-radius: 18px;
    padding: 12px 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.search-wrapper:focus-within {
    border-color: var(--primary-blue);
    box-shadow: 0 10px 25px rgba(0, 122, 255, 0.15);
    transform: translateY(-2px);
}

.search-icon {
    color: var(--primary-blue);
    font-size: 1.2rem;
    margin-right: 15px;
}

#posSearch {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1.1rem; /* ????? ???? ??????? ?????? */
    font-weight: 500;
    color: var(--text-dark);
    outline: none;
}

#posSearch::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.search-clear {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
}

.search-clear:hover {
    color: var(--status-danger);
}

/* ?? ??? css/style.css ?? ???? ??? style */

/* ???? ????? ?????? - ???? ????? */
.search-container {
    padding: 15px 20px; /* ????? ??????? ????? ???? */
    background: var(--bg-main);
    position: sticky;
    top: 0;
    z-index: 100;
}

.search-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 2px solid rgba(0, 122, 255, 0.15); /* ???? ????? ????? */
    border-radius: 20px;
    padding: 15px 25px; /* ????? ??????? ???????? */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

#posSearch {
    font-size: 1.2rem; /* ????? ?? ????? */
    font-weight: 600;
    width: 100%;
    border: none;
    background: transparent;
    outline: none;
    color: var(--text-dark);
}

/* ?? ????? ????? ?? Place Order ?? ???? ?????? */
.checkout-box {
    padding: 20px;
    padding-bottom: 100px; /* ????? ???? ???? ??????? ?? ????????? */
    background: var(--bg-card);
    border-top: 1px dashed #ddd;
}

.btn-checkout {
    width: 100%;
    padding: 18px;
    font-size: 1.1rem;
    font-weight: 800;
    border-radius: 15px;
    margin-bottom: 10px; /* ??? ???? ?????? ?? ???? ?????? ?????? */
}


.app-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 70px;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--pad-std);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px); /* ????? ????? ???? */
    -webkit-backdrop-filter: blur(10px);
}

/* ???? ???? ????????? ???? ???? ??? ????? */
.sun-icon { display: none; color: #FFB703; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="dark"] .sun-icon { display: block; }

/* --- ????? ?????? ???? ?????? ?????? ?? ?????? --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px; /* ?? ??????? ?? 85px ??????? ?? ?????? */
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 2000;
    transition: all 0.3s ease;
}

/* ??? ????? ?????? ?????? ?????? */
[data-theme="dark"] .bottom-nav {
    background: rgba(28, 28, 30, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ????? ????????? ??????? */
.nav-item {
    gap: 3px; /* ????? ??????? ??????? */
    flex: 1;
}

.nav-item i {
    font-size: 20px; /* ?? ??????? ?? 24px ??????? */
}

.nav-item span {
    font-size: 11px; /* ?? ??????? ?? 13px ??????? */
    font-weight: 600;
}

/* ????? ???? ?????? ??????? ?????? ???????? ?????? */
.nav-fab {
    width: 52px;
    height: 52px;
    font-size: 22px;
    top: -15px; /* ???? ?????? ????? ?????? ???? ???? */
}

:root {
    /* ????? ????????? ?????? ?????? - ?????? ?????? */
    --primary-blue: #FF6B00; 
    /* ???? ???? ?????? ???????? ???? Badges */
    --primary-light: rgba(255, 107, 0, 0.1); 
    
    /* ???????? ?????? ???? ???????? */
    --header-height: 70px;
    --nav-height: 70px;
}

/* ?? ??? style.css - ????? 185 ??????? */
.bottom-nav .nav-item.active {
    color: var(--primary-blue) !important; /* ????? ????????? ?????? */
}

.bottom-nav .nav-item.active i {
    color: var(--primary-blue) !important;
    transform: translateY(-2px); /* ????? ???? ???? ??????? */
}

/* ????? ??? ???????? ?????? ?????? ?? ????? ?????? ??????? */
[data-theme="dark"] .bottom-nav .nav-item.active {
    color: #FF822E !important; 
    text-shadow: 0 0 8px rgba(255, 107, 0, 0.4);
}
/* ????? ??????? ????????? ???????? */
.pos-sidebar {
    width: 90px; /* ????? ????? ?????? */
}

.cat-item {
    width: 65px; /* ????? ??? ??????? */
    height: 65px;
    border-radius: 20px;
    font-size: 24px; /* ????? ??? ???????? (FontAwesome) */
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.cat-item i {
    font-size: 26px; /* ??? ???????? ??????? */
}

/* ????? ????? ??????? ???? ????? */
.category-display-title {
    margin-top: 15px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-dark);
    padding-left: 5px;
    border-left: 4px solid var(--primary-blue); /* ?? ??????? ????? */
    padding-left: 12px;
    text-transform: capitalize;
}

[data-theme="dark"] .category-display-title {
    color: #ffffff;
}

/* ????? ????? ??????? ?????? */
.category-display-title {
    margin: 15px 0 10px 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ???? ??? ??????? */
.item-count-badge {
    font-size: 0.9rem;
    font-weight: 600;
    background: var(--primary-light); /* ????? ???????? ????? */
    color: var(--primary-blue); /* ?? ??????? ???? */
    padding: 4px 12px;
    border-radius: 50px;
    border: 1px solid rgba(255, 107, 0, 0.2);
}

/* ????? ????????? ???????? ??? ???? */
.cat-item {
    width: 70px; /* ??? ???? ??????? */
    height: 70px;
    border-radius: 20px;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: var(--bg-card);
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cat-item.active {
    background: var(--primary-blue);
    color: white;
    transform: scale(1.1); /* ????? ????? ???? ??? ?????? */
}


/* ????? ???? ?????? ?? ??????? */
.item-count-badge {
    margin-left: 10px;
    background: rgba(255, 107, 0, 0.1); /* ??? ??????? ???? */
    color: var(--primary-blue);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    vertical-align: middle;
}

.branch-pill{
display:none;
}

/* --- ????? ??????: ????? ??????? ??????? ?????? ?? --- */
.app-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 70px;
    /* ????? ????? ?????? ?????? ????????? ?????? ????? ?? ?????? ?????? */
    background: rgba(248, 249, 250, 0.8); 
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--pad-std);
    
    /* ????? ?? ???? ???? ?????? ?? ????? ?????? */
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

/* ????? ?????? ?? ????? ?????? ??????? ?? ??????? ??????? */
[data-theme="dark"] .app-header {
    background: rgba(28, 28, 30, 0.8);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ??? ????? ?????? ?????? */
.app-header {
    transition: transform 0.3s ease-in-out, background 0.3s ease;
    will-change: transform;
}

.header-hidden {
    transform: translateY(-100%); /* ????? ?????? ???? ?????? ?????? */
}


/* ????? ????? ??? ????? */
.pulse-effect:active {
    transform: scale(0.95);
    transition: transform 0.1s;
}

/* ???? ???? ??? ???? (??????? ??????? ??????) */
@keyframes buttonPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 107, 0, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 107, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 107, 0, 0); }
}

.btn-pulse-animate {
    animation: buttonPulse 2s infinite;
}

/* ????? ??????? ??? ????? ??? POS */
.cat-item, .product-card, .btn-checkout, .nav-fab {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}


.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff3b30; /* ??? ???? ??????? */
    color: white;
    font-size: 12px;
    font-weight: 800;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-card);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* ????? 945 ?? ??? style.css ??????? */
.nav-fab-container {
    position: relative; /* ????? ????? ?????? ?????? ???? ??????? */
}

.cart-badge {
    position: absolute;
    /* ????? ?????????? ????? ??? ???????? ?????? */
    top: -8px; 
    right: 15px; /* ????? ??????? ?? ?????? ?????? ?? ??????? */
    background: #5a0fce; /* ????? ?????? ??????? */
    color: white;
    font-size: 11px;
    font-weight: 800;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex; /* ????? ???? ????? ???? ??????? */
    align-items: center;
    justify-content: center;
    border: 2px solid white; /* ???? ???? ?????? ?? ????? ????????? */
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 10;
    pointer-events: none; /* ??? ?? ???? ????? ??? ???? ??????? */
}

/* ?? ??? ??? ????? ????? ???? ??? ?????? */
[data-theme="dark"] .cart-badge {
    border-color: #1c1c1e;
}

/* --- Modern Toast Notification --- */
.toast-notification {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 50px;
    padding: 16px;
    position: fixed;
    z-index: 3000;
    left: 50%;
    bottom: 100px; /* Above the bottom nav */
    transform: translateX(-50%);
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.toast-notification.show {
    visibility: visible;
    opacity: 1;
    bottom: 110px; /* Small slide up effect */
}

/* Success Type */
.toast-notification.success {
    background-color: var(--status-success); /* Green */
}

/* Error Type */
.toast-notification.error {
    background-color: var(--status-danger); /* Red */
}


/* =========================================
   RESPONSIVE DESKTOP UPDATE
   ========================================= */

/* --- Base Visibility Classes --- */
.desktop-only { display: none !important; }
.desktop-sidebar { display: none; }

/* --- Responsive Media Query (Desktop > 1024px) --- */
@media (min-width: 1024px) {

    /* 1. Hide Mobile Elements */
    .mobile-only { display: none !important; }
    .mobile-only-flex { display: none !important; }
    
    /* 2. Show Desktop Elements */
    .desktop-only { display: block !important; }

    /* 3. Sidebar Styling */
    .desktop-sidebar {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 260px;
        background: var(--bg-card);
        border-right: 1px solid rgba(0,0,0,0.05);
        z-index: 2000;
        padding: 30px 0;
    }

    .sidebar-header {
        padding: 0 30px;
        margin-bottom: 40px;
		margin-top:5px;
    }
    .sidebar-logo {
        height: 35px;
        width: auto;
    }

    .sidebar-nav {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 0 15px;
        flex: 1; /* Push footer down */
    }

    .nav-item-desktop {
        display: flex;
        align-items: center;
        gap: 15px;
        padding: 14px 20px;
        color: var(--text-muted);
        text-decoration: none;
        border-radius: 12px;
        font-weight: 600;
        font-size: 15px;
        transition: all 0.2s ease;
        border: none;
        background: transparent;
        cursor: pointer;
        width: 100%;
        text-align: left;
    }

    .nav-item-desktop:hover {
        background: var(--bg-main);
        color: var(--text-dark);
    }

    .nav-item-desktop.active {
        background: rgba(0, 122, 255, 0.1); /* Primary Light */
        color: var(--primary-blue);
    }
    
    .nav-item-desktop i {
        width: 20px;
        text-align: center;
        font-size: 18px;
    }

    .sidebar-footer {
        padding: 0 15px;
        margin-top: auto;
        border-top: 1px solid rgba(0,0,0,0.05);
        padding-top: 20px;
    }
    
    .text-danger { color: var(--status-danger) !important; }

    /* 4. Layout Adjustments */
    .main-content {
        margin-left: 260px; /* Width of sidebar */
        min-height: 100vh;
    }

    .app-header {
        position: sticky;
        top: 0;
        padding: 20px 40px;
        height: 90px;
        background: transparent; /* Cleaner look on desktop */
        backdrop-filter: none;
        box-shadow: none;
        border-bottom: none;
        width: 100%;
    }

    .desktop-title {
        font-size: 18px;
        font-weight: 600;
        color: var(--text-dark);
    }

    /* 5. Page Content Specifics */
    .apps-page {
        padding: 0 40px;
    }

    .search-bar-lg {
        background: var(--bg-card);
        max-width: 100%;
        border-radius: 16px;
    }

    .apps-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 25px;
    }
    
    .app-card {
        padding: 30px 20px;
    }
    
    /* 6. Dark Mode Adjustments for Sidebar */
    [data-theme="dark"] .desktop-sidebar {
        border-right: 1px solid rgba(255,255,255,0.05);
    }
    [data-theme="dark"] .nav-item-desktop.active {
        background: rgba(10, 132, 255, 0.15);
    }
}

/* =========================================
   RESPONSIVE DESKTOP UPDATE (FINAL)
   ========================================= */

/* --- Base Visibility Classes --- */
.desktop-only { display: none !important; }
.desktop-sidebar { display: none; }

/* --- Responsive Media Query (Desktop > 1024px) --- */
@media (min-width: 1024px) {

    /* 1. Hide Mobile Elements */
    .mobile-only { display: none !important; }
    .mobile-only-flex { display: none !important; }
    
    /* 2. Show Desktop Elements */
    .desktop-only { display: block !important; }

    /* 3. Layout: Sidebar & Main Content */
    .desktop-sidebar {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 260px;
        background: #FFFFFF; /* White Sidebar */
        border-right: 1px solid rgba(0,0,0,0.05);
        z-index: 2000;
        padding: 30px 0;
        box-shadow: 4px 0 20px rgba(0,0,0,0.02);
    }

    .main-content {
        margin-left: 260px;
        min-height: 100vh;
        background-color: #F5F7FB; /* [IMPORTANT] Light Gray Background */
        padding-bottom: 50px;
    }

    /* 4. Header Styling (Matches Screenshot) */
   .app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 15px 25px;
    background: var(--bg-card);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
	height: 70px;
}

    .desktop-title {
        font-size: 18px;
        font-weight: 600;
        color: #1F222B;
        letter-spacing: -0.5px;
        margin: 0;
    }

    /* Profile Icon (Blue Circle Style) */
    .header-right .user-profile {
        width: 45px;
        height: 45px;
        border-radius: 50%;
        background-color: #007AFF; /* Primary Blue */
        border: 3px solid #FFFFFF;
        box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }
    
    /* 5. Sidebar Navigation */
    .sidebar-header { padding: 0 30px; margin-bottom: 40px; }
    .sidebar-logo { height: 35px; width: auto; }
    
    .sidebar-nav {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 0 15px;
        flex: 1;
    }

    .nav-item-desktop {
        display: flex;
        align-items: center;
        gap: 15px;
        padding: 14px 20px;
        color: #8A94A6;
        text-decoration: none;
        border-radius: 12px;
        font-weight: 600;
        font-size: 15px;
        transition: all 0.2s ease;
        border: none;
        background: transparent;
        cursor: pointer;
        width: 100%;
    }

    .nav-item-desktop:hover {
        background: #F8F9FA;
        color: #1F222B;
    }

    .nav-item-desktop.active {
        background: rgba(0, 122, 255, 0.08);
        color: #007AFF;
    }
    
    .sidebar-footer {
        padding: 0px;
		padding-top:20px;
        border-top: 1px solid rgba(0,0,0,0.05);
    }

    /* 6. Page Components (Search & Grid) */
    .apps-page { padding: 0 40px; }

    /* Make Search Bar Pop on Gray Background */
    .search-bar-lg {
        background: #FFFFFF;
        border-radius: 16px;
        border: 1px solid rgba(0,0,0,0.02);
        box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    }
    .search-bar-lg:focus-within {
        box-shadow: 0 8px 25px rgba(0, 122, 255, 0.1);
        border-color: #007AFF;
    }

    /* Grid Adjustments */
    .apps-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 25px;
    }
    
    .app-card {
        background: #FFFFFF;
        box-shadow: 0 4px 20px rgba(0,0,0,0.02);
        border: none;
        padding: 35px 20px;
    }
    
    /* Dark Mode Override for Desktop */
    [data-theme="dark"] .desktop-sidebar { 
        background: #1C1C1E; 
        border-right: 1px solid rgba(255,255,255,0.05); 
    }
    [data-theme="dark"] .main-content { background-color: #000000; }
    [data-theme="dark"] .desktop-title { color: #FFFFFF; }
    [data-theme="dark"] .app-card { background: #1C1C1E; }
    [data-theme="dark"] .search-bar-lg { background: #1C1C1E; }
}

@media (min-width: 1024px) {
    .sidebar-logo {
        max-width: 150px;
        height: auto;
        display: block;
        margin: 0 auto;
    }
}

@media (min-width: 1024px) {
    .desktop-sidebar {
     
        padding: 20px;
        
    }
}

    .sidebar-nav {
        display: flex;
        flex-direction: column;
        gap: 10px;
        height: 100%;
		padding:0;
    }
	
@media (min-width: 1024px) {
    .sidebar-nav .nav-item {
        flex-direction: row;
        font-size: 14px;
        font-weight: 600;
        padding: 12px 15px;
        border-radius: 12px;
        transition: all 0.2s;
        align-items: center;
    }
}	


.online-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: #2ec4b6;
    border: 2px solid white;
    border-radius: 50%;
}

[data-theme="dark"] .desktop-back-btn {
    background: #1C1C1E;
    border-color: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
}
	
	[data-theme="dark"] .desktop-back-btn:hover {
    background: #2C2C2E;
}


/* ==========================================================================
   REPORT & DATATABLE STYLES
   (Moved from sales_report.html)
   ========================================================================== */

:root {
    --font-size-xs: 11px;
    --font-size-sm: 12px;
    --font-size-md: 13px;
    --font-size-lg: 14px;
    --table-header-bg: #f8f9fa; 
    --table-border-color: #eff2f5;
    --table-stripe-bg: #fcfcfc;
}

/* --- CONTAINER OVERRIDE FOR REPORTS --- */
/* Note: Consider adding a specific class to the report page container if strict isolation is needed. 
   For now, this appends to existing styles. */
.app-container { 
    padding: var(--pad-std); 
    padding-bottom: 30px; 
    overflow-x: hidden; 
}

/* --- STANDARD UI ELEMENTS --- */
.desktop-back-btn {
    width: 40px; height: 40px; border-radius: 12px; background: #FFFFFF;
    border: 1px solid rgba(0,0,0,0.05); display: flex; align-items: center; justify-content: center;
    margin-right: 20px; cursor: pointer; color: var(--text-dark);
    box-shadow: 0 2px 5px rgba(0,0,0,0.02); transition: all 0.2s ease;
}
.desktop-back-btn:hover { transform: translateX(-3px); box-shadow: 0 4px 10px rgba(0,0,0,0.05); color: var(--primary-blue); }

.input-group { position: relative; width: 100%; min-width: 0; }
.select2-container { width: 100% !important; display: block; }
.select2-container .select2-selection--single {
    height: 40px; background-color: var(--bg-main); border: 1px solid transparent;
    border-radius: 10px; display: flex; align-items: center;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-dark); font-size: 13px; font-weight: 600; padding-left: 12px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 38px; right: 8px; }
.select2-dropdown { border: none; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); z-index: 9999; background: var(--bg-card); }
.select2-results__option { font-size: 13px; padding: 10px 15px; color: var(--text-dark); }
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { background-color: var(--primary-blue); }

/* --- FILTERS LAYOUT --- */
.page-title { font-size: 1.2rem; font-weight: 800; color: var(--text-dark); margin: 15px 0 10px 0; display: none; }
.filters-wrapper {
    background: var(--bg-card); border-radius: 16px; padding: 15px 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02); margin: 10px 0 20px 0; border: 1px solid rgba(0,0,0,0.02);
}
.filters-layout { display: grid; grid-template-areas: "basic buttons" "advanced advanced"; grid-template-columns: 1fr auto; gap: 12px; align-items: end; }
.basic-section { grid-area: basic; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; }
#advancedFilters { grid-area: advanced; display: none; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-top: 5px; padding-top: 15px; border-top: 1px dashed rgba(0,0,0,0.08); width: 100%; }
.buttons-section { grid-area: buttons; display: flex; gap: 8px; }
.input-label { font-size: 11px; font-weight: 700; color: var(--text-muted); margin-left: 2px; white-space: nowrap; margin-bottom: 4px; }
.styled-input { background: var(--bg-main); border: 1px solid transparent; border-radius: 10px; padding: 8px 12px; font-size: 13px; color: var(--text-dark); width: 100%; outline: none; font-weight: 600; height: 40px; }

.action-btn { background: #fd7e14; color: white; border: none; border-radius: 10px; height: 40px; padding: 0 20px; font-weight: 700; font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; transition: 0.2s; box-shadow: 0 4px 10px rgba(253, 126, 20, 0.2); }
.action-btn:hover { background: #e8710e; transform: translateY(-1px); }

.toggle-btn { background: var(--bg-main); color: var(--text-dark); border: 1px solid transparent; width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 14px; transition: 0.2s; }
.toggle-btn.active { background: var(--text-dark); color: white; }

.reset-btn { background: #0c1c80; color: white; border: none; border-radius: 10px; height: 40px; padding: 0 15px; font-weight: 700; font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; transition: 0.2s; box-shadow: 0 4px 10px rgba(12, 28, 128, 0.2); }
.reset-btn:hover { background: #071257; transform: translateY(-1px); }

/* --- REPORT CARD & TOOLBAR --- */
.report-card { background: var(--bg-card); border-radius: 20px; padding: 20px; box-shadow: 0 8px 30px rgba(0,0,0,0.05); min-height: 400px; position: relative; }

.grid-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 15px; flex-wrap: wrap; }

.search-container { position: relative; width: 220px; background: transparent !important; padding: 0 !important; }
.search-container i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #aaa; font-size: 13px; }

.search-input { 
    width: 100%; background: #ffffff !important; border: 1px solid rgba(0,0,0,0.05); 
    border-radius: 10px; padding: 10px 10px 10px 36px; font-size: 13px; font-weight: 600; outline: none; color: var(--text-dark);
    transition: all 0.2s;
}
.search-input:focus { border-color: var(--primary-blue); box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1); }

.grid-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn { 
    width: 38px; height: 38px; border-radius: 10px; border: none; cursor: pointer; 
    display: flex; align-items: center; justify-content: center; font-size: 14px; 
    background: var(--bg-main); color: var(--text-dark); transition: all 0.2s ease;
}
.icon-btn:hover { transform: translateY(-2px); color: white; }

/* --- SETTINGS DROPDOWN --- */
.settings-dropdown {
    display: none;
    position: absolute;
    top: 45px;
    right: 0;
    width: 220px;
    background: var(--bg-card, #ffffff);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.05);
    padding: 15px;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
    text-align: left;
}

.settings-dropdown.active { display: block; }

.dropdown-header {
    font-size: var(--font-size-xs); font-weight: 800; color: var(--text-muted, #aaa);
    text-transform: uppercase; margin-bottom: 8px; letter-spacing: 0.5px;
}

.dropdown-divider { height: 1px; background: rgba(0,0,0,0.05); margin: 12px 0; }

.styled-input-small {
    width: 100%; padding: 6px 10px; border-radius: 8px; border: 1px solid rgba(0,0,0,0.1);
    font-size: var(--font-size-sm); color: var(--text-dark, #333); outline: none; background-color: var(--bg-main);
}

.toggles-list { display: flex; flex-direction: column; gap: 8px; max-height: 200px; overflow-y: auto; }

.toggle-row {
    display: flex; align-items: center; gap: 10px; font-size: var(--font-size-md);
    font-weight: 600; color: var(--text-dark); cursor: pointer; user-select: none;
}

.toggle-row input { 
    accent-color: #0d6efd !important; 
    cursor: pointer; width: 16px; height: 16px; 
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- TABULATOR STYLES --- */
.tabulator { border: none !important; background-color: transparent !important; }

/* HEADER UPDATES */
.tabulator-header { 
    background-color: transparent !important; 
    border-bottom: 2px solid #fd7e14 !important; 
    border-top: none !important; 
}
.tabulator-col-content { padding: 15px !important; }

/* REQUIRED HEADER STYLE */
.tabulator-col-title { 
    color: #0c1c80 !important; 
    font-weight: 800; 
    font-size: 11px; 
    text-transform: uppercase; 
}

.tabulator-row { background-color: var(--bg-card) !important; border-bottom: 1px solid rgba(0,0,0,0.04) !important; color: var(--text-dark); font-size: 13px; font-weight: 600; }
.tabulator-row:hover { background-color: rgba(253, 126, 20, 0.05) !important; }
.tabulator-group { background: #f8f9fa !important; border-bottom: 1px solid #eee !important; font-weight: 700 !important; color: var(--text-dark); padding: 10px 15px !important; }

.tabulator-row .tabulator-cell {
    padding: 4px 8px !important;
    height: 28px !important;
    line-height: 20px !important;
    display: inline-flex; /* UPDATED: Removed !important to allow hiding */
    align-items: center;
    color: inherit;
    border-right: none !important; 
}

/* FOOTER & CALCS STYLING */
.tabulator-footer { background-color: #f6f7f8 !important; border-top: 1px solid rgba(0,0,0,0.05) !important; padding: 10px 15px !important; }

/* Force remove gray background from totals */
.tabulator-row.tabulator-calcs.tabulator-calcs-bottom {
    background-color: transparent !important;
    border-bottom: none !important;
    border-top: none !important;
}
.tabulator-calcs-holder { 
    background: transparent !important; 
    border: none !important; 
}
.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row,
.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-cell {
    background: transparent !important;
    border: none !important;
}

/* REQUIRED TOTAL TEXT STYLE */
.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-cell[tabulator-field="_Amount"] {
    color: #fd7e14 !important;
    font-weight: 800 !important;
    font-size: 14px !important;
    text-align: center !important; 
    overflow: visible !important;
    padding-right: 15px !important;
}

/* --- CUSTOM PLACEHOLDER & PAGINATION STYLES --- */
.tabulator .tabulator-placeholder .tabulator-placeholder-contents {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #b0b0b0 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tabulator-footer .tabulator-paginator label {
    font-size: 10px !important;
    font-weight: 600 !important;
    color: #999 !important;
    text-transform: uppercase;
    margin-right: 5px;
}

.tabulator-footer select {
    font-size: 10px !important;
    padding: 2px 5px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 6px !important;
    color: var(--text-dark) !important;
    outline: none;
    cursor: pointer;
    background-color: #fff;
    height: 24px;
}

.tabulator-page {
    font-size: 10px !important;
    border-radius: 6px !important;
    border: 1px solid transparent !important;
    color: var(--text-dark) !important;
    font-weight: 600 !important;
    padding: 4px 8px !important;
}
.tabulator-page.active {
    background-color: var(--primary-blue) !important;
    color: #fff !important;
}

/* Chart View */
#chart-view {
    width: 100%;
    height: 400px;
    padding: 20px;
    display: none;
    background: #fff;
    border-radius: 16px;
    margin-top: 10px;
}

/* --- MOBILE CARD DESIGN --- */
.mobile-card {
    display: flex; flex-direction: column; gap: 8px; width: 100%; box-sizing: border-box;
}
.mc-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px dashed rgba(0,0,0,0.05); padding-bottom: 8px; margin-bottom: 4px; }
.mc-order { font-weight: 800; color: var(--text-dark); font-size: 14px; }
.mc-date { font-size: 11px; color: #999; }

.mc-body { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 12px; }
.mc-row { display: flex; flex-direction: column; }
.mc-row span { color: #aaa; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.mc-row strong { color: var(--text-dark); font-weight: 600; }

.mc-footer { 
    margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(0,0,0,0.05); 
    display: flex; justify-content: space-between; align-items: center; 
}
.mc-total { color: #fd7e14; font-weight: 800; font-size: 15px; }

/* --- RESPONSIVE RULES (REPORT SPECIFIC) --- */
@media (max-width: 1024px) {
    .mobile-only-title { display: block;  font-size: 1rem  !important; margin: 0 0 5px 0  !important; }
    .filters-layout { display: flex; flex-direction: column; gap: 15px; }
    .basic-section { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .grid-toolbar { flex-direction: column-reverse; align-items: stretch; gap: 10px; }
    .search-container { width: 100%; }
    .grid-actions { justify-content: space-between; width: 100%; }
    .icon-btn { flex: 1; }
    
    /* Stack Filters Vertically 2 per line */
    .basic-section { grid-template-columns: 1fr 1fr; } 
    #advancedFilters { grid-template-columns: 1fr 1fr; }

    .filters-wrapper { padding: 15px; }

    /* Hide Tabulator Headers on Mobile */
    .tabulator-header { display: none !important; }
    
    /* --- FIX: RESET CONTAINER STYLES --- */
    .report-card {
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        min-height: auto !important;
        border: none !important;
    }

    /* --- FIX: RESET TABLE WRAPPERS --- */
    .tabulator-tableholder, .tabulator-table {
        height: auto !important;
        min-height: 0 !important;
    }

    /* --- CRITICAL FIX: FORCE ROW HEIGHT TO AUTO --- */
    .tabulator-row { 
        background-color: #fff !important; 
        border-bottom: 15px solid var(--bg-main) !important; 
        border-radius: 12px; 
        box-shadow: 0 2px 8px rgba(0,0,0,0.05); 
        margin-bottom: 0px !important; 
        
        /* Remove fixed height calculations from Tabulator */
        height: auto !important; 
        min-height: 0 !important;
        
        /* Disable absolute positioning virtual DOM logic */
        display: block !important;
        position: relative !important; 
    }

    /* --- FIX: CELL CONTENT --- */
    .tabulator-row .tabulator-cell { 
        height: auto !important; 
        display: block; /* UPDATED: Removed !important here too */
        white-space: normal !important;
        padding: 15px !important;
        border: none !important;
    }
    .tabulator-col-resize-handle {
        display: none !important;
    }
    .tabulator-tableholder { padding-top: 10px; }
}

.tabulator .tabulator-footer .tabulator-calcs-holder {
    box-sizing: border-box;
    width: 100%;
    text-align: left;
    background: #fff !important;
}

[data-theme="dark"] .desktop-back-btn {
    background: #1C1C1E;
    border-color: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
}

[data-theme="dark"] .desktop-back-btn:hover {
    background: #2C2C2E;
}

[data-theme="dark"] .tabulator-page {
    border-color: rgba(255, 255, 255, 0.1)  !important;
    color: #FFFFFF  !important;
    background: #2C2C2E  !important;
}

[data-theme="dark"] .tabulator-page-size {
    color: #000  !important;
}