/* Modern Dashboard Improvements */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Improved Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body[data-theme="light"] .dashboard-header {
    border-bottom: 1px solid #cbd5e1;
}

.header-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

body[data-theme="light"] .header-title {
    background: linear-gradient(90deg, #0284c7, #6366f1);
    -webkit-background-clip: text;
}

.header-subtitle {
    font-size: 1rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

body[data-theme="light"] .header-subtitle {
    color: #64748b;
}

/* Status Overview Cards */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.status-card {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

body[data-theme="light"] .status-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.status-card:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

body[data-theme="light"] .status-card:hover {
    border-color: #94a3b8;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.status-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.status-card-icon {
    font-size: 1.5rem;
    margin-right: 0.75rem;
}

.status-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #e2e8f0;
}

body[data-theme="light"] .status-card-title {
    color: #1e293b;
}

.status-card-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.status-card-description {
    color: #94a3b8;
    font-size: 0.9rem;
}

body[data-theme="light"] .status-card-description {
    color: #64748b;
}

/* Progress Bars */
.progress-container {
    margin-top: 1rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.progress-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

body[data-theme="light"] .progress-bar {
    background: #e2e8f0;
}

.progress-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
}

.progress-fill.success {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.progress-fill.warning {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.progress-fill.danger {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

/* Agent Cards - Improved Layout */
.agents-section {
    margin: 2rem 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #e2e8f0;
    display: flex;
    align-items: center;
}

body[data-theme="light"] .section-title {
    color: #1e293b;
}

.section-title-icon {
    margin-right: 0.75rem;
}

.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.agent-card-modern {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

body[data-theme="light"] .agent-card-modern {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #b8c5d6;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.agent-card-modern:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

body[data-theme="light"] .agent-card-modern:hover {
    border-color: #94a3b8;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.10);
}

.agent-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.agent-icon {
    font-size: 1.75rem;
    margin-right: 1rem;
    width: 40px;
    text-align: center;
}

.agent-info {
    flex: 1;
}

.agent-name-modern {
    font-size: 1.25rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.25rem;
}

body[data-theme="light"] .agent-name-modern {
    color: #0f172a;
    font-weight: 700;
}

.agent-role {
    font-size: 0.9rem;
    color: #818cf8;
}

body[data-theme="light"] .agent-role {
    color: #4f46e5;
    font-weight: 600;
}

.agent-status {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.status-indicator-modern {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-indicator-modern.active {
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.3);
}

.status-indicator-modern.idle {
    background: #64748b;
}

body[data-theme="light"] .status-indicator-modern.idle {
    background: #94a3b8;
}

.status-text-modern {
    font-size: 0.9rem;
    font-weight: 500;
}

body[data-theme="light"] .status-text-modern {
    color: #334155;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.task-container-modern {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
}

body[data-theme="light"] .task-container-modern {
    background: #eaf1f8;
    border: 1px solid #cbd5e1;
}

.task-label-modern {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body[data-theme="light"] .task-label-modern {
    color: #475569;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.task-text-modern {
    font-size: 1rem;
    color: #e2e8f0;
    line-height: 1.5;
}

body[data-theme="light"] .task-text-modern {
    color: #1e293b;
    font-weight: 500;
    line-height: 1.45;
}

.task-text-modern.idle {
    color: #94a3b8;
    font-style: italic;
}

body[data-theme="light"] .task-text-modern.idle {
    color: #64748b;
    font-style: italic;
}

/* Progress Mini Bar for Agents */
.agent-progress-mini {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 0.75rem;
    overflow: hidden;
}

body[data-theme="light"] .agent-progress-mini {
    background: #e2e8f0;
}

.agent-progress-fill-mini {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
}

body[data-theme="light"] .agent-progress-fill-mini {
    background: linear-gradient(90deg, #0284c7, #6366f1);
}

/* Quick Actions */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
}

.quick-action-btn {
    flex: 1;
    min-width: 200px;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

body[data-theme="light"] .quick-action-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.quick-action-btn:hover {
    transform: translateY(-3px);
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(56, 189, 248, 0.1);
}

body[data-theme="light"] .quick-action-btn:hover {
    border-color: #94a3b8;
    background: #f8fafc;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.quick-action-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.quick-action-text {
    font-size: 1rem;
    font-weight: 500;
    color: #e2e8f0;
}

body[data-theme="light"] .quick-action-text {
    color: #1e293b;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
    }
    
    .agents-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .quick-action-btn {
        width: 100%;
    }
    
    .header-title {
        font-size: 1.75rem;
    }
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #1e293b, #334155, #1e293b);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
    height: 20px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.loading-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #94a3b8;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.empty-state-subtext {
    font-size: 1rem;
    color: #64748b;
}

/* Notification Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

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

.slide-up {
    animation: slideUp 0.5s ease forwards;
}

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