/* Modern Dashboard Styles */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gray: #6b7280;
    --light-gray: #f8fafc;
    --dark: #1e293b;
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--light-gray);
    color: var(--dark);
    line-height: 1.6;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--white);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.logo {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    margin-right: 0.75rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

/* Navigation */
.nav-section {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.nav-section h3 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 1.5rem 0.5rem;
}

.nav-section .nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-section .nav-item:hover {
    background-color: var(--light-gray);
    color: var(--primary);
}

.nav-section .nav-item i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

/* Company Info */
.company-info {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.company-info h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.company-info p {
    font-size: 0.75rem;
    color: var(--gray);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
}

/* Top Bar */
.top-bar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-greeting h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.user-greeting p {
    color: var(--gray);
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--dark);
}

.btn-outline:hover {
    background: var(--light-gray);
}

/* Quick Actions */
.quick-actions {
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-btn {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--dark);
    transition: all 0.2s ease;
}

.action-btn:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.action-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.2rem;
}

.action-customer { background: #dbeafe; color: #1d4ed8; }
.action-task { background: #fef3c7; color: #d97706; }
.action-account { background: #d1fae5; color: #059669; }
.action-sale { background: #fee2e2; color: #dc2626; }

/* Dashboard Cards */
.dashboard-cards {
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sales-icon { background: #dbeafe; color: #1d4ed8; }
.tasks-icon { background: #fef3c7; color: #d97706; }
.items-icon { background: #d1fae5; color: #059669; }
.revenue-icon { background: #fee2e2; color: #dc2626; }

.card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.card-change {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
}

.card-change.positive { color: var(--success); }
.card-change.negative { color: var(--danger); }

/* Tasks Section */
.tasks-section {
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.task-card, .sales-chart {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.task-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.task-stat {
    text-align: center;
}

.task-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

.task-stat-label {
    font-size: 0.875rem;
    color: var(--gray);
}

.task-list {
    list-style: none;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.task-item:last-child {
    border-bottom: none;
}

.task-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 4px;
    margin-right: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-content {
    flex: 1;
}

.task-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.task-desc {
    font-size: 0.875rem;
    color: var(--gray);
}

/* Sales Chart */
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chart-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
}

.chart-container {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.chart-placeholder {
    text-align: center;
    color: var(--gray);
}

/* Recent Sales */
.recent-sales {
    padding: 0 2rem;
    margin-bottom: 2rem;
}

.table-container {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--light-gray);
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    font-weight: 600;
    color: var(--gray);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-completed {
    background: #d1fae5;
    color: #059669;
}

.no-data {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
}

/* Footer */
.footer {
    margin-top: auto;
    padding: 1.5rem 2rem;
    background: var(--white);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.help-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.help-link:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }

    .main-content {
        margin-left: 240px;
    }

    .tasks-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .top-bar {
        padding: 1rem;
    }

    .quick-actions {
        padding: 1rem;
        grid-template-columns: 1fr;
    }

    .dashboard-cards {
        padding: 0 1rem;
        grid-template-columns: 1fr;
    }

    .tasks-section {
        padding: 0 1rem;
    }

    .recent-sales {
        padding: 0 1rem;
    }

    .footer {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}