:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #38bdf8;
    --accent-hover: #0ea5e9;
    --primary: #38bdf8;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --sidebar-width: 260px;
    --font-main: 'Outfit', sans-serif;
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 280px;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100%;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-card);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        transform: translateX(-100%);
        background-color: var(--bg-dark);
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.5);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

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

.logo h2 {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.highlight {
    color: var(--accent);
}

.nav-item {
    display: block;
    padding: 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.nav-item:hover,
.nav-item.active {
    background-color: rgba(56, 189, 248, 0.1);
    color: var(--accent);
}

/* Main Content */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.top-bar {
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 768px) {
    .top-bar {
        padding: 1rem 1.5rem;
    }

    .page-content {
        padding: 0 1rem 1rem 1rem;
    }

    .header-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn-secondary {
        margin-right: 0;
        width: 100%;
        text-align: center;
    }

    .table-container {
        overflow-x: auto;
    }
}

/* Mobile Toggle Button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 1rem;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
}

.page-content {
    padding: 0 2rem 2rem 2rem;
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.card {
    background-color: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card h3 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.big-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* UI Elements */
.header-actions {
    margin-bottom: 2rem;
    display: flex;
    justify-content: flex-end;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    background: none;
    font-family: var(--font-main);
}

.btn-primary {
    background-color: var(--accent);
    color: #fff;
}

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

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    margin-right: 1rem;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.table-container {
    background-color: var(--bg-card);
    border-radius: 16px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.data-table th {
    color: var(--text-secondary);
    font-weight: 500;
}

.btn-icon {
    color: var(--accent);
    text-decoration: none;
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.badge.success {
    background-color: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.badge.danger {
    background-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Forms */
.form-container {
    background-color: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .form-container {
        padding: 1.5rem 1rem;
    }
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--bg-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background-color: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: #0f172a;
}

.product-info {
    padding: 1.5rem;
}

.product-group {
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    display: block;
}

.product-info h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* Helper Classes */
.btn-full-width {
    width: 100%;
    margin-top: 1rem;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-text-muted {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

.form-actions-footer {
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 768px) {
    .form-actions-footer {
        flex-direction: column-reverse;
        /* Put button on top or maintain order but stack? Let's stack naturally but button might need to be full width */
        align-items: stretch;
    }

    .form-actions-footer .btn {
        width: 100%;
    }

    .form-help-text {
        text-align: center;
        font-size: 0.85rem;
    }
}

.price {
    font-size: 1.2rem;
    font-weight: 700;
}