/* ... Previous styles ... */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
    --primary-color: #0f766e;
    --secondary-color: #0f172a;
    --bg-color: #f7f8fb;
    --text-color: #0f172a;
    --muted-text: #64748b;
    --surface: #ffffff;
    --surface-2: #f1f5f9;
    --surface-3: #eef2f7;
    --border: #e2e8f0;
    --accent: #f97316;
    --error: #ef4444;
    --success: #22c55e;
    --shadow-sm: 0 6px 16px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 18px 40px rgba(15, 23, 42, 0.14);
    --radius-xl: 22px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 9px;
    --ring: 0 0 0 3px rgba(15, 118, 110, 0.18);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    background:
        radial-gradient(1100px 520px at 8% -10%, #e0f2fe 0%, transparent 55%),
        radial-gradient(900px 420px at 110% 5%, #fff7ed 0%, transparent 60%),
        radial-gradient(800px 500px at 50% 120%, #e0f7fa 0%, transparent 60%),
        var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
}

/* Auth Styles (kept for reference, can merge if needed) */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-container {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    width: 300px;
    text-align: center;
    border: 1px solid var(--border);
}

/* Reused form elements */
.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
input[type="date"],
input[type="text"],
input[type="number"],
input[type="password"],
select {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-sizing: border-box;
    background: var(--surface);
    color: var(--text-color);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--ring);
}

button {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s ease;
}

button:hover {
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

button:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    gap: 0;
}

.sidebar {
    width: 260px;
    background:
        linear-gradient(160deg, #0f766e 0%, #0f172a 70%);
    color: white;
    padding: 2rem 1.25rem;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    align-self: flex-start;
    min-height: 100vh;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar h2 {
    margin-top: 0;
    font-size: 1.4rem;
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
    font-family: 'Space Grotesk', 'Manrope', system-ui, sans-serif;
}

.sidebar a {
    display: block;
    color: #ecf0f1;
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    transition: background 0.2s, transform 0.2s;
    border: 1px solid transparent;
}

.sidebar a:hover,
.sidebar a.active {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(2px);
    border-color: rgba(255, 255, 255, 0.12);
}

.main-content {
    flex-grow: 1;
    padding: 2.5rem;
    overflow-y: auto;
    max-width: 1400px;
}

.main-content h1,
.main-content h2,
.main-content h3 {
    font-family: 'Space Grotesk', 'Manrope', system-ui, sans-serif;
    letter-spacing: 0.2px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(400px 120px at 10% -20%, rgba(15, 118, 110, 0.08), transparent 60%);
    pointer-events: none;
}

.stat-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: var(--muted-text);
}

.stat-card p {
    margin: 0;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary-color);
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: var(--surface-2);
    font-weight: 600;
    color: var(--secondary-color);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:nth-child(even) td {
    background: #fbfcfe;
}

/* Buttons */
.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

.btn-danger {
    background: var(--error);
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: var(--surface);
    margin: 10% auto;
    padding: 2rem;
    border-radius: var(--radius-xl);
    width: 400px;
    position: relative;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.chart-card,
.search-section,
.filter-section {
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.filter-section {
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Responsive Design */

/* Mobile Sidebar & Layout */
@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 1rem;
        text-align: center;
        position: relative;
        min-height: auto;
        border-right: none;
    }

    .main-content {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .table-responsive {
        overflow-x: auto;
    }

    /* POS Mobile */
    .pos-container {
        flex-direction: column;
        height: auto;
        overflow: auto;
    }

    .pos-main {
        padding: 1rem;
    }

    .pos-sidebar {
        width: 100%;
        height: auto;
        box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
        position: sticky;
        bottom: 0;
        z-index: 100;
        border-top: 1px solid #eee;
    }

    .cart-items {
        max-height: 200px;
        /* Limit height on mobile */
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns on mobile */
    }

    /* Increase touch targets */
    button,
    .product-card {
        min-height: 44px;
    }

    .product-card {
        height: auto;
    }
}

/* Print Styles for Receipts */
@media print {
    @page {
        margin: 0;
        size: auto;
    }

    body {
        margin: 0;
        padding: 0;
        background: white;
    }
}

/* Print Styles for Receipts */
@media print {
    @page {
        margin: 0;
        size: auto;
    }

    body {
        margin: 0;
        padding: 0;
        background: white;
    }
}

@media (max-width: 1024px) {
    .main-content {
        padding: 1.75rem;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (min-width: 1400px) {
    .dashboard-container {
        justify-content: center;
        gap: 2rem;
    }
}
