:root {
    --primary-color: #4e73df;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --dark-bg: #1a1c23;
    --card-bg: #24262d;
    --text-color: #e2e8f0;
    --sidebar-width: 250px;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

/* Glassmorphism Card */
.card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: var(--text-color);
}

.card-header {
    background-color: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

/* Sidebar */
.sidebar {
    height: 100vh;
    width: var(--sidebar-width);
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--card-bg);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    transition: all 0.3s;
    z-index: 1000;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    transition: all 0.3s;
    border-radius: 0 25px 25px 0;
    margin-right: 10px;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(78, 115, 223, 0.1) 0%, rgba(78, 115, 223, 0.4) 100%);
    border-left: 4px solid var(--primary-color);
}

.sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 20px;
    transition: all 0.3s;
}

/* Navbar */
.navbar {
    background-color: var(--card-bg) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
}

.navbar-brand {
    color: #fff !important;
    font-weight: 700;
}

/* Tables */
.table {
    color: var(--text-color);
}

.table thead th {
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.table td,
.table th {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.1);
}

/* Form Controls */
.form-control,
.form-select {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.form-control:focus,
.form-select:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: none;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Login Page */
.login-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #2c3e50 0%, #000000 100%);
}

.login-box {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

/* Modals */
.modal-content {
    background-color: #24262d;
    /* Solid dark background */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    color: #fff;
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.02);
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.02);
}

.modal-backdrop.show {
    opacity: 0.8;
    backdrop-filter: blur(5px);
}

.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* POS Specific Heights */
.pos-products-container {
    height: 70vh;
}

.pos-cart-container {
    height: 50vh;
    overflow-y: auto;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 10px;
    }

    .pos-products-container {
        height: 40vh;
        /* Smaller height on mobile to fit cart */
    }

    .pos-cart-container {
        height: auto;
        /* Let it grow naturally or set a max height */
        max-height: 40vh;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }
}

/* Fix for table visibility */
.table td,
.table th {
    color: rgba(255, 255, 255, 0.8) !important;
    background-color: transparent !important;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-color);
    --bs-table-hover-color: #fff;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.05);
}

/* Global visibility fix */
.text-muted {
    color: #ffffff !important;
}