.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--dark);
    color: var(--white);
    padding: 2rem 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar .logo {
    padding: 0 1.5rem;
    margin-bottom: 2rem;
}

.sidebar .logo h2 {
    color: var(--white);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.sidebar-nav a {
    padding: 1rem 1.5rem;
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: background 0.3s;
    opacity: 0.8;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

.sidebar-nav i {
    width: 20px;
}

.dashboard-main {
    margin-right: 260px;
    flex: 1;
    background: var(--light);
}

.dashboard-header {
    background: var(--white);
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header h1 {
    font-size: 1.8rem;
    color: var(--dark);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dashboard-content {
    padding: 2rem;
}

.dashboard-section {
    display: none;
}

.dashboard-section.active {
    display: block;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    flex-shrink: 0;
}

.stat-content h3 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
    color: var(--dark);
    font-weight: 700;
}

.stat-content p {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.dashboard-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card-header h3 {
    margin: 0;
    color: white;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body {
    padding: 1.5rem;
}

.performance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.performance-item:last-child {
    border-bottom: none;
}

.performance-item span {
    color: #6b7280;
    font-size: 0.95rem;
}

.performance-item strong {
    color: var(--dark);
    font-size: 1.1rem;
}

.notifications-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 1rem;
    align-items: start;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.notification-icon.info {
    background: #dbeafe;
    color: #1e40af;
}

.notification-icon.success {
    background: #d1fae5;
    color: #065f46;
}

.notification-icon.warning {
    background: #fef3c7;
    color: #92400e;
}

.notification-content {
    flex: 1;
}

.notification-content p {
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
}

.notification-content small {
    color: #6b7280;
    font-size: 0.85rem;
}

/* Recent Activity */
.recent-activity {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.recent-activity h3 {
    margin-bottom: 1.5rem;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    padding: 1rem;
    background: var(--light);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-item .time {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

/* Products Table */
.products-table {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 1rem;
    text-align: right;
    border-bottom: 1px solid var(--border);
}

.table th {
    background: var(--light);
    font-weight: 600;
}

.table tr:hover {
    background: var(--light);
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    padding: 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--primary-color);
    transition: color 0.3s;
}

.btn-icon:hover {
    color: var(--secondary-color);
}

.btn-icon.danger {
    color: var(--danger-color);
}

/* Product Form */
.product-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-width: 800px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.image-preview {
    margin-top: 1rem;
    max-width: 300px;
}

.image-preview img {
    width: 100%;
    border-radius: 8px;
}

/* Orders List */
.orders-list {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

.order-item {
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.order-status {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.order-status.completed {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.order-status.pending {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.order-status.rejected {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* Sales Summary */
.sales-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.summary-card h4 {
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.summary-card p {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.chart-container {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    min-height: 300px;
}

/* Settings Form */
.settings-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-width: 600px;
}

.settings-form h4 {
    margin-bottom: 1.5rem;
    color: var(--dark);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .dashboard-main {
        margin-right: 0;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}
