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

body {
    font-family: 'Inter', sans-serif;
    background: #f5f7fb;
    color: #1a1f36;
}

.container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 1rem;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.logo h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.logo p {
    font-size: 0.85rem;
    opacity: 0.9;
}

.nav-menu {
    margin-top: 2rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
}

.nav-item:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(5px);
}

.nav-item.active {
    background: rgba(255,255,255,0.3);
    font-weight: 600;
}

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

.top-bar {
    background: white;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-primary, .btn-secondary, .btn-success {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #48bb78;
    color: white;
}

.btn-secondary:hover {
    background: #38a169;
}

.btn-success {
    background: #38a169;
    color: white;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.stat-card h3 {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #2d3748;
}

/* Tables */
.orders-table, .products-table {
    width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.orders-table th, .products-table th {
    background: #f7fafc;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
}

.orders-table td, .products-table td {
    padding: 1rem;
    border-top: 1px solid #e2e8f0;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-pending {
    background: #fed7d7;
    color: #c53030;
}

.status-processing {
    background: #feebc8;
    color: #c05621;
}

.status-shipped {
    background: #c6f6d5;
    color: #276749;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 2rem;
    width: 50%;
    border-radius: 12px;
    max-height: 80%;
    overflow-y: auto;
}

.close {
    float: right;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Sync Panel */
.sync-panel {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin: 1rem;
}

.sync-status {
    margin: 1rem 0;
    padding: 1rem;
    background: #ebf8ff;
    border-radius: 8px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 80px;
    }
    .sidebar h2, .sidebar p {
        display: none;
    }
    .nav-item span:first-child {
        font-size: 1.5rem;
    }
}