:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #ec4899;
    --accent: #8b5cf6;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #1e293b;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.dark {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-sidebar: #020617;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --glass: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    transition: background-color 0.3s, color 0.3s;
    min-height: 100vh;
}

/* Sidebar Styling - Modern Overlay Style */
#sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    color: white;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
    display: flex;
    flex-direction: column;
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.1);
}

#sidebar.open {
    transform: translateX(0);
}

#main-content {
    margin-left: 0;
    padding: 0;
    min-height: 100vh;
    transition: all 0.3s ease;
    width: 100%;
}

/* Overlay for sidebar */
#sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 150;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: #94a3b8;
    text-decoration: none;
    transition: 0.2s;
    border-radius: 0.5rem;
    margin: 0.25rem 0.75rem;
}

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

.sidebar-link i {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

/* Glassmorphism */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

/* Inputs & Buttons */
.btn {
    padding: 0.6rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

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

.input-field {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background-color: var(--bg-card);
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s;
}

.input-field:focus {
    border-color: var(--primary);
}

/* Pos Layout */
.pos-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
}

.product-item {
    background: var(--bg-card);
    border-radius: 1rem;
    overflow: hidden;
    transition: 0.3s;
    cursor: pointer;
    border: 1px solid var(--border);
}

.product-item:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-lg);
}

.product-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease forwards;
}

/* Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

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

.dark ::-webkit-scrollbar-thumb {
    background: #334155;
}