/* 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, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #4f46e5;
}

.logo i {
    font-size: 2rem;
}

.header-status {
    display: flex;
    gap: 2rem;
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.status-item .label {
    font-size: 0.8rem;
    color: #6b7280;
}

.status-item .value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #4f46e5;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #374151;
    font-weight: 500;
}

.user-profile i {
    font-size: 1.5rem;
}

/* Main Container */
.main-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 80px);
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem 0;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.8);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 500;
}

.nav-item i {
    width: 1.2rem;
    text-align: center;
}

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

.page {
    display: none;
}

.page.active {
    display: block;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

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

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card h2 {
    color: #374151;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Quick Actions */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.btn-secondary:hover {
    background: rgba(79, 70, 229, 0.2);
}

/* Agent Network */
.agent-status {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1rem;
}

.status-indicator {
    text-align: center;
}

.agent-count {
    font-size: 2rem;
    font-weight: 700;
    color: #4f46e5;
}

.agent-label {
    font-size: 0.9rem;
    color: #6b7280;
}

.agent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.agent-tile {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.agent-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.agent-tile.active {
    border-color: #4f46e5;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    animation: pulse 2s infinite;
}

.agent-tile.processing {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    animation: spin 1s linear infinite;
}

.agent-tile.complete {
    border-color: #10b981;
    background: linear-gradient(135deg, #34d399, #10b981);
    color: white;
}

.agent-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.agent-name {
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.agent-status {
    font-size: 0.7rem;
    opacity: 0.8;
}

/* Performance Overview */
.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.metric {
    text-align: center;
    padding: 1rem;
    background: rgba(79, 70, 229, 0.05);
    border-radius: 0.5rem;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #4f46e5;
}

.metric-label {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0.25rem 0;
}

.metric-change {
    font-size: 0.8rem;
    font-weight: 500;
}

.metric-change.positive {
    color: #10b981;
}

.metric-change.negative {
    color: #ef4444;
}

/* Campaign List */
.campaign-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.campaign-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(79, 70, 229, 0.05);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.campaign-item:hover {
    background: rgba(79, 70, 229, 0.1);
}

.campaign-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.campaign-name {
    font-weight: 500;
    color: #374151;
}

.campaign-status {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
    width: fit-content;
}

.campaign-status.active {
    background: #dcfce7;
    color: #166534;
}

.campaign-status.complete {
    background: #e0e7ff;
    color: #3730a3;
}

.campaign-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-end;
}

.campaign-metrics span {
    font-size: 0.9rem;
    color: #6b7280;
}

/* Campaign Builder */
.campaign-wizard {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.step-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.step-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e5e7eb;
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.2s ease;
}

.step.active .step-number {
    background: #4f46e5;
    color: white;
}

.step.completed .step-number {
    background: #10b981;
    color: white;
}

.step-label {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
}

.step.active .step-label {
    color: #4f46e5;
}

.step-content {
    min-height: 500px;
}

/* Agent Activity Panel */
.agent-activity-panel {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem;
    transition: right 0.3s ease;
    z-index: 200;
}

.agent-activity-panel.open {
    right: 0;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.panel-header h3 {
    color: #374151;
    font-size: 1.25rem;
    font-weight: 600;
}

.close-panel {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.close-panel:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        order: 2;
    }

    .main-content {
        order: 1;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .step-progress {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .agent-activity-panel {
        width: 100%;
        right: -100%;
    }
}