:root {
    --primary: #f53b57;
    --secondary: #2f3640;
    --bg-light: #f1f2f6;
    --text-dark: #2f3542;
    --text-light: #a4b0be;
    --white: #ffffff;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100%;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: var(--white);
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
}

nav ul {
    list-style: none;
}

.nav-item {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 500;
    color: var(--text-light);
}

.nav-item:hover,
.nav-item.active {
    background-color: rgba(245, 59, 87, 0.1);
    color: var(--primary);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 2rem;
    font-weight: 600;
}

/* Billing Section */
.billing-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    height: calc(100vh - 150px);
}

.product-selection {
    background: var(--white);
    padding: 20px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-light);
    padding: 10px 15px;
    border-radius: 10px;
    gap: 10px;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 1rem;
}

.category-filters {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.cat-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    background: var(--bg-light);
    cursor: pointer;
    font-weight: 500;
    white-space: nowrap;
    transition: 0.2s;
}

.cat-btn.active,
.cat-btn:hover {
    background: var(--primary);
    color: white;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    overflow-y: auto;
    padding-right: 5px;
}

.product-card {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: 15px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
}

.product-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.product-img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

.product-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.product-price {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 700;
}

/* Bill Panel */
.bill-panel {
    background: var(--white);
    padding: 20px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.customer-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.customer-details input {
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 8px;
    outline: none;
}

.bill-items-container {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

.bill-table {
    width: 100%;
    border-collapse: collapse;
}

.bill-table th {
    text-align: left;
    padding: 10px 5px;
    color: var(--text-light);
    font-size: 0.8rem;
    border-bottom: 1px solid #eee;
}

.bill-table td {
    padding: 10px 5px;
    font-size: 0.9rem;
    border-bottom: 1px solid #f9f9f9;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 5px;
}

.qty-btn {
    width: 20px;
    height: 20px;
    border: none;
    background: var(--bg-light);
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.bill-summary {
    border-top: 2px dashed #eee;
    padding-top: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 700;
}

.btn-generate {
    width: 100%;
    padding: 15px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: 0.2s;
}

.btn-generate:hover {
    background: #e6354d;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.red {
    background: var(--primary);
}

.stat-icon.blue {
    background: #3498db;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    width: 400px;
    max-width: 90%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
}

.receipt-paper {
    background: #fff;
    padding: 20px;
    border: 1px solid #eee;
    margin-bottom: 20px;
    font-family: 'Courier New', Courier, monospace;
}

.modal-actions {
    display: flex;
    gap: 10px;
}

.modal-actions button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-print {
    background: var(--secondary);
    color: white;
}