/* Beckaree Global Theme & Styling */
:root {
    --primary: #ea580c;
    --primary-hover: #c2410c;
    --primary-light: #ffedd5;
    --secondary: #0f172a;
    --accent: #0284c7;
    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --content-bg: #f8fafc;
    --card-border: #e2e8f0;
    --text-dark: #1e293b;
    --text-muted: #64748b;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--content-bg);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Dashboard Layout */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: #f8fafc;
    flex-shrink: 0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.sidebar .brand {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid #1e293b;
    background: rgba(0,0,0,0.15);
}

.sidebar .brand i {
    color: var(--primary);
    font-size: 1.6rem;
}

.sidebar-nav {
    list-style: none;
    padding: 15px 10px;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-nav li {
    margin-bottom: 4px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.92rem;
    transition: all 0.2s ease;
}

.sidebar-nav a i {
    font-size: 1.15rem;
    width: 22px;
    text-align: center;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--content-bg);
}

.topbar {
    height: 64px;
    background: #ffffff;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 99;
}

.content-body {
    padding: 24px;
    flex-grow: 1;
}

/* Stat & KPI Cards */
.stat-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.orange { background: #ffedd5; color: #ea580c; }
.stat-icon.blue { background: #e0f2fe; color: #0284c7; }
.stat-icon.green { background: #dcfce7; color: #16a34a; }
.stat-icon.purple { background: #f3e8ff; color: #9333ea; }
.stat-icon.red { background: #fee2e2; color: #dc2626; }

/* Custom Tables */
.table-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.table-card .card-header {
    background: #ffffff;
    border-bottom: 1px solid var(--card-border);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
}

.custom-table {
    margin: 0;
}

.custom-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--card-border);
}

.custom-table td {
    padding: 12px 16px;
    vertical-align: middle;
    color: #334155;
    font-size: 0.92rem;
    border-bottom: 1px solid #f1f5f9;
}

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

/* POS Screen Styles */
.pos-wrapper {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: #f1f5f9;
}

.pos-products-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px;
    overflow-y: auto;
    border-right: 1px solid #cbd5e1;
}

.pos-cart-col {
    width: 440px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    height: 100vh;
    box-shadow: -4px 0 15px rgba(0,0,0,0.05);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.pos-prod-card {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.pos-prod-card:hover {
    border-color: var(--primary);
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.15);
}

.pos-prod-card img {
    width: 100%;
    height: 85px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 6px;
}

.pos-prod-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.2;
    color: #1e293b;
}

.pos-prod-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.95rem;
}

.pos-prod-stock {
    font-size: 0.72rem;
    color: #64748b;
}

/* Cart Table & Checkout Box */
.cart-items-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.cart-table th {
    font-size: 0.78rem;
    background: #f8fafc;
    padding: 8px;
}

.cart-table td {
    padding: 8px;
    font-size: 0.85rem;
}

.cart-summary-box {
    background: #f8fafc;
    border-top: 2px dashed #cbd5e1;
    padding: 15px;
}

/* Responsive Breakpoints */
@media (max-width: 991px) {
    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        bottom: 0;
    }
    .sidebar.show {
        left: 0;
    }
    .pos-wrapper {
        flex-direction: column;
        height: auto;
        overflow-y: auto;
    }
    .pos-cart-col {
        width: 100%;
        height: auto;
    }
}

/* Badge Utility Styling */
.badge-best-seller {
    background: #ffc107 !important;
    color: #1e293b !important;
    font-weight: 700 !important;
    display: inline-block !important;
    padding: 3px 9px !important;
    border-radius: 12px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    text-shadow: none !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
}
