* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

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

h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #fff;
}

.refresh-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #888;
}

.refresh-indicator .dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Summary Cards */
.summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.card {
    background: #111;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.card h3 {
    font-size: 0.875rem;
    font-weight: 500;
    color: #888;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card .value {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.card .subtitle {
    font-size: 0.75rem;
    color: #666;
}

/* Agents Section */
.agents-section {
    margin-bottom: 3rem;
}

.agents-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1.5rem;
}

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

.agent-card {
    background: #111;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 1.5rem;
}

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

.agent-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.agent-role {
    font-size: 0.75rem;
    color: #666;
    background: #222;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.agent-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.agent-stat {
    text-align: center;
}

.agent-stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.agent-stat-label {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
}

.agent-cost {
    text-align: center;
    padding-top: 0.5rem;
    border-top: 1px solid #222;
}

.agent-cost-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #22c55e;
}

.agent-last-active {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.5rem;
}

.agent-tasks {
    margin-top: 0.75rem;
}

.agent-tasks-title {
    font-size: 0.7rem;
    color: #888;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.agent-task {
    font-size: 0.75rem;
    color: #ccc;
    margin-bottom: 0.25rem;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sessions Section */
.sessions-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1.5rem;
}

.sessions-table-container {
    background: #111;
    border: 1px solid #222;
    border-radius: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.sessions-table {
    min-width: 600px;
    width: 100%;
    border-collapse: collapse;
}

.sessions-table th {
    background: #1a1a1a;
    color: #888;
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.875rem;
    text-align: left;
}

.sessions-table td {
    padding: 0.875rem;
    border-top: 1px solid #222;
    color: #e0e0e0;
    font-size: 0.85rem;
}

.sessions-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.agent-name-cell {
    font-weight: 600;
    color: #fff;
}

.task-cell {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-cell {
    text-transform: capitalize;
}

.status-running {
    color: #22c55e;
}

.status-completed {
    color: #3b82f6;
}

.status-failed {
    color: #ef4444;
}

.cost-cell {
    color: #22c55e;
    font-weight: 500;
}

.tokens-cell {
    color: #888;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 0.8rem;
}

.time-cell {
    color: #888;
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .summary {
        grid-template-columns: 1fr;
    }
    
    .agents-grid {
        grid-template-columns: 1fr;
    }
    
    .sessions-table-container {
        overflow-x: auto;
    }
    
    .sessions-table {
    min-width: 600px;
        min-width: 700px;
    }
}

/* Loading State */
.loading {
    color: #666;
    font-style: italic;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #666;
}
/* Hub Navigation */
.hub-nav {
    padding: 12px 20px;
    border-bottom: 1px solid #222;
    background: #0a0a0a;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #888;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: #fff;
}

.back-link svg {
    flex-shrink: 0;
}
