/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 50%, #e8eaf6 100%);
    color: #1f2937;
    line-height: 1.6;
    min-height: 100vh;
}

/* Dashboard Container */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar Styles */
.sidebar {
    width: 256px;
    background: white;
    border-right: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-title {
    font-size: 24px;
    font-weight: 300;
    color: #1f2937;
    margin-bottom: 4px;
}

.sidebar-subtitle {
    font-size: 14px;
    color: #6b7280;
}

.sidebar-nav {
    margin-top: 24px;
    padding: 0 12px;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px;
    color: #4b5563;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-link:hover {
    background-color: #f3f4f6;
    color: #1f2937;
}

.nav-item.active .nav-link {
    background-color: #dbeafe;
    color: #1d4ed8;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    font-size: 16px;
}

.nav-item.active .nav-icon {
    color: #2563eb;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 12px;
    border-top: 1px solid #e5e7eb;
}

.sidebar-footer-link {
    display: flex;
    align-items: center;
    padding: 12px;
    color: #4b5563;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
    margin-bottom: 4px;
}

.sidebar-footer-link:hover {
    background-color: #f3f4f6;
}

.sidebar-footer-link.logout:hover {
    background-color: #fef2f2;
    color: #dc2626;
}

.sidebar-footer-link i {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    font-size: 16px;
}

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

/* Header */
.header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 18px;
    color: #4b5563;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.sidebar-toggle:hover {
    background-color: #f3f4f6;
}

.search-container {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 16px;
}

.search-input {
    padding: 8px 16px 8px 40px;
    width: 320px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    padding: 8px;
    color: #6b7280;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.notification-btn:hover {
    background-color: #f3f4f6;
    color: #1f2937;
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background-color: #ef4444;
    border-radius: 50%;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 16px;
    border-left: 1px solid #e5e7eb;
}

.user-info {
    text-align: right;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
}

.user-role {
    font-size: 12px;
    color: #6b7280;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

/* Dashboard Content */
.dashboard-content {
    flex: 1;
    padding: 32px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.content-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 32px;
    font-weight: 300;
    color: #1f2937;
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 18px;
    color: #6b7280;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.metric-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #f3f4f6;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.metric-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.metric-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 16px;
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.metric-label span {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.metric-content {
    padding: 0 24px 24px;
}

.metric-value {
    font-size: 32px;
    font-weight: 300;
    color: #1f2937;
    margin-bottom: 16px;
}

.metric-progress {
    width: 100%;
    height: 4px;
    background-color: #f3f4f6;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 24px;
}

.progress-bar {
    height: 100%;
    width: 60%;
    border-radius: 2px;
    transition: width 1s ease;
    animation: progressGrow 2s ease forwards;
}

.metric-action {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
}

.metric-action:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.metric-action:active {
    transform: scale(0.98);
}

/* Color Variants */
.blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.rose { background: linear-gradient(135deg, #f43f5e, #e11d48); }
.orange { background: linear-gradient(135deg, #f97316, #ea580c); }
.teal { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.amber { background: linear-gradient(135deg, #f59e0b, #d97706); }
.gray { background: linear-gradient(135deg, #6b7280, #4b5563); }
.lime { background: linear-gradient(135deg, #84cc16, #65a30d); }
.green { background: linear-gradient(135deg, #22c55e, #16a34a); }

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes progressGrow {
    from { width: 0; }
    to { width: 60%; }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }

    .dashboard-content {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        transform: translateX(-100%);
        z-index: 1000;
    }

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

    .sidebar-toggle {
        display: block;
    }

    .search-input {
        width: 200px;
    }

    .header {
        padding: 16px 20px;
    }

    .dashboard-content {
        padding: 20px;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .user-info {
        display: none;
    }
}

@media (max-width: 480px) {
    .header-left {
        gap: 12px;
    }

    .search-input {
        width: 150px;
    }

    .page-title {
        font-size: 24px;
    }

    .page-subtitle {
        font-size: 16px;
    }

    .metric-card {
        margin: 0;
    }
}

/* Animation delays for staggered effect */
.metric-card:nth-child(1) { animation-delay: 0.1s; }
.metric-card:nth-child(2) { animation-delay: 0.2s; }
.metric-card:nth-child(3) { animation-delay: 0.3s; }
.metric-card:nth-child(4) { animation-delay: 0.4s; }
.metric-card:nth-child(5) { animation-delay: 0.5s; }
.metric-card:nth-child(6) { animation-delay: 0.6s; }
.metric-card:nth-child(7) { animation-delay: 0.7s; }
.metric-card:nth-child(8) { animation-delay: 0.8s; }

/* Hover effects for progress bars */
.metric-card:hover .progress-bar {
    width: 100% !important;
}
