:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --accent: #8b5cf6;
    --background: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --border: #e2e8f0;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    --radius-lg: 1rem;
    --radius-md: 0.75rem;
    --font-main: 'Outfit', 'Inter', system-ui, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 95%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

.fade-in {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.brand {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    background: white;
    padding: 0.5rem;
    border-radius: 99px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.nav-link {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1.2rem;
    border-radius: 99px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--primary);
    background: #f1f5f9;
}

.nav-link.active {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.grid-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, 0.2);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover::before {
    opacity: 1;
}

.card h3 {
    color: var(--text-light);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card .value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    gap: 0.5rem;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px -2px rgba(99, 102, 241, 0.4);
}

.btn-danger {
    background: #fee2e2;
    color: #ef4444;
}

.btn-danger:hover {
    background: #fecaca;
}

.btn-secondary {
    background: white;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    border-color: var(--text-light);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3);
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    font-size: 1rem;
    transition: all 0.2s;
    background: #f8fafc;
}

.form-control:focus {
    background: white;
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.table-container {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    overflow-x: auto;
    margin-top: 1rem;
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    background: #f8fafc;
    padding: 1.2rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-light);
    font-weight: 700;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: #f1f5f9;
}

.badge {
    padding: 0.35rem 0.85rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-purple {
    background: #ede9fe;
    color: #5b21b6;
}

.pos-layout {
    display: grid;
    grid-template-columns: 2fr 1.1fr;
    gap: 2rem;
    height: calc(100vh - 120px);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    overflow-y: auto;
    padding: 0.5rem;
}

.pos-product-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.pos-product-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.cart-panel {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--border);
    overflow: hidden;
}

.cart-header {
    background: linear-gradient(to right, var(--primary), var(--accent));
    color: white;
    padding: 1.5rem;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #f8fafc;
}

.cart-summary {
    padding: 1.5rem;
    background: white;
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 6px -1px rgb(0 0 0 / 0.05);
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f1f5f9;
}

.login-box {
    background: white;
    padding: 3rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
}

.flex {
    display: flex;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.w-full {
    width: 100%;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-light {
    color: var(--text-light);
}

.reports-header-mobile {
    display: none;
}

.reports-header-desktop {
    display: flex;
}

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: background 0.2s;
}

.hamburger-btn:hover {
    background: #f1f5f9;
}

@media (max-width: 768px) {

    .reports-header-mobile {
        display: block;
    }

    .reports-header-desktop {
        display: none;
    }

    .container {
        padding: 1rem;
        width: 100%;
        padding-top: 1.5rem;
    }

    .navbar {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        height: auto;
        padding: 0.75rem 0;
        position: relative;
    }

    .hamburger-btn {
        display: block;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        background: white;
        padding: 1rem;
        border-radius: var(--radius-lg);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        margin-top: 1rem;
        border: 1px solid var(--border);
        gap: 0.5rem;
        animation: slideDown 0.3s ease-out;
    }

    .nav-links.mobile-active {
        display: flex;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .nav-links li {
        width: 100%;
    }

    .nav-link {
        display: block;
        width: 100%;
        text-align: center;
        margin-bottom: 0px;
        border-radius: var(--radius-md);
        padding: 0.75rem;
        transition: background 0.2s;
    }

    .nav-link.active {
        box-shadow: none;
        background: var(--primary);
        color: white;
    }

    .pos-layout {
        display: flex;
        flex-direction: column;
        grid-template-columns: 1fr;
        height: auto;
        gap: 1rem;
        padding-bottom: 80px;
    }

    .product-grid {
        max-height: 40vh;
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 0.5rem;
        padding: 0;
    }

    .pos-product-card {
        padding: 0.75rem;
    }

    .cart-panel {
        height: auto;
        max-height: none;
        border-radius: var(--radius-lg);
        overflow: visible;
    }

    .cart-items {
        max-height: 300px;
    }

    .grid-dashboard {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1rem;
    }

    .card {
        padding: 1rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: 0.8rem;
    }

    .login-box {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
}