:root {
    --primary: #9B51E0;
    --primary-dark: #6B2C91;
    --primary-light: #D4A5F3;
    --bg-light: #F4F7FE;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-dark: #2B3674;
    --text-muted: #A3AED0;
    --border: rgba(224, 229, 242, 0.5);
    --shadow: 0 10px 30px rgba(107, 44, 145, 0.08);
}

body {
    background: linear-gradient(135deg, var(--bg-light) 0%, #E9D5FF 100%);
    font-family: 'Outfit', sans-serif;
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    padding: 2.5rem 2rem;
    box-shadow: 2px 0 20px rgba(0,0,0,0.02);
    z-index: 10;
}

.sidebar-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.menu-item {
    padding: 1rem 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-radius: 16px;
    margin-bottom: 0.8rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-item:hover {
    background: rgba(155, 81, 224, 0.05);
    color: var(--primary);
    transform: translateX(5px);
}

.menu-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(107, 44, 145, 0.3);
}

.main-content {
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideDown 0.5s ease-out forwards;
}

.header h2 {
    font-size: 2.2rem;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Stats Area */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    animation: fadeUp 0.6s ease-out forwards;
}

.stat-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: var(--primary);
    background: rgba(155, 81, 224, 0.1);
}

.stat-info h4 {
    margin: 0;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
}

.stat-info h3 {
    margin: 5px 0 0 0;
    font-size: 1.8rem;
    color: var(--text-dark);
}

/* Dual Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    animation: fadeUp 0.8s ease-out forwards;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.card-title {
    font-size: 1.2rem;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    color: var(--text-muted);
    padding: 1rem;
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

td {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

tr:hover td {
    background: rgba(155, 81, 224, 0.02);
}

.prod-img-cell {
    width: 60px;
}

.prod-img-cell img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    background: rgba(155, 81, 224, 0.05);
    border-radius: 12px;
    padding: 5px;
}

.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s;
    font-family: inherit;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary { 
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white; 
    box-shadow: 0 4px 15px rgba(107, 44, 145, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(107, 44, 145, 0.5);
    transform: translateY(-2px);
}

.btn-danger { background: #EE5D50; color: white;}
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; border-radius: 12px; }

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(43, 54, 116, 0.4);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-content {
    background: white;
    padding: 2.5rem;
    border-radius: 24px;
    width: 600px;
    max-width: 90%;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.show {
    opacity: 1;
}

.modal-overlay.show .modal-content {
    transform: translateY(0);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 16px;
    box-sizing: border-box;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: flex;
    gap: 1.5rem;
}
.form-row .form-group { flex: 1; }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@media(max-width: 992px) {
    .dashboard-grid { grid-template-columns: 1fr; }
}
