:root {
    --sidebar-width: 260px;
    --primary-color: #2563eb;
    --sidebar-bg: #1e293b;
    --sidebar-text: #94a3b8;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #f1f5f9;
}

[data-bs-theme="dark"] body {
    background-color: #0f172a;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
}

.login-card {
    background: white;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 400px;
}

[data-bs-theme="dark"] .login-card {
    background: #1e293b;
}

.wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background-color: var(--sidebar-bg);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.sidebar .nav {
    padding: 1rem 0;
}

.sidebar .nav-item {
    margin: 0.25rem 0.75rem;
}

.sidebar .nav-link {
    color: var(--sidebar-text);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.sidebar .nav-link i {
    font-size: 1.1rem;
}

#content {
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: all 0.3s ease;
}

.sidebar.collapsed {
    margin-left: calc(-1 * var(--sidebar-width));
}

.sidebar.collapsed + #content {
    width: 100%;
    margin-left: 0;
}

.stat-card {
    border-radius: 0.75rem;
    border: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.stat-card .card-body {
    padding: 1.5rem;
}

.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1rem 1.25rem;
}

[data-bs-theme="dark"] .card-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    border-bottom-width: 1px;
}

.table td {
    vertical-align: middle;
}

.product-card {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.product-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.pos-cart {
    position: sticky;
    top: 1rem;
}

.cart-items {
    max-height: 300px;
    overflow-y: auto;
}

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

[data-bs-theme="dark"] .cart-item {
    border-bottom-color: #334155;
}

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

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.cart-item-price {
    font-size: 0.85rem;
    color: #64748b;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-item-qty button {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-qty span {
    min-width: 30px;
    text-align: center;
    font-weight: 500;
}

.cart-item-total {
    font-weight: 600;
    min-width: 80px;
    text-align: right;
}

.cart-item-remove {
    margin-left: 0.5rem;
}

.cart-totals {
    background: #f8fafc;
    border-radius: 0.5rem;
    padding: 1rem;
}

[data-bs-theme="dark"] .cart-totals {
    background: #334155;
}

.category-filter {
    font-size: 0.85rem;
}

.category-filter.active {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

.btn-group {
    flex-wrap: wrap;
    gap: 0.25rem;
}

@media (max-width: 991.98px) {
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    
    .sidebar.show {
        margin-left: 0;
    }
    
    #content {
        width: 100%;
        margin-left: 0;
    }
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

code {
    color: #e11d48;
    background: #fef2f2;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

[data-bs-theme="dark"] code {
    background: #1e293b;
    color: #fb7185;
}

.pagination .page-link {
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-track {
    background: #1e293b;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #475569;
}

.invoice-print {
    background: white;
}

@media print {
    body {
        background: white !important;
    }
    
    .invoice-print {
        box-shadow: none !important;
    }
}
