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

:root {
    --bg-dark: #0a0a0a;
    --bg-card: #1a1a1a;
    --bg-hover: #252525;
    --accent-yellow: #ffc107;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --border: #333;
    --status-active: #4caf50;
    --status-pending: #2196f3;
    --status-warning: #ff9800;
    --status-error: #f44336;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    font-size: 24px;
    font-weight: 700;
}

.logo .emoji {
    font-size: 32px;
}

.nav-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-yellow);
    color: var(--bg-dark);
    font-weight: 600;
}

.nav-item .icon {
    font-size: 18px;
    width: 24px;
}

.nav-item.dropdown {
    justify-content: space-between;
}

.dropdown-arrow {
    font-size: 12px;
    transition: transform 0.2s;
}

.dropdown-content {
    display: flex;
    flex-direction: column;
    padding-left: 36px;
}

.nav-item.sub {
    padding: 8px 16px;
    font-size: 14px;
}

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

/* Command Bar */
.command-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 20px 40px;
    display: flex;
    gap: 16px;
    align-items: center;
}

#command-input {
    flex: 1;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 20px;
    color: var(--text-primary);
    font-size: 16px;
}

#command-input:focus {
    outline: none;
    border-color: var(--accent-yellow);
}

.btn-primary {
    background: var(--accent-yellow);
    color: var(--bg-dark);
    border: none;
    border-radius: 8px;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Page Container */
#page-container {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.page h1 {
    font-size: 32px;
    margin-bottom: 32px;
}

.page h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.page h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

/* Status Cards */
.status-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.status-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.card-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--accent-yellow);
    margin-bottom: 8px;
}

.card-label {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Agent Visualization */
.agent-viz-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 40px;
    max-width: 900px;
}

#agent-viz, #agent-viz-augmented {
    width: 100%;
    height: 400px;
    display: block;
}

/* Activity Feed */
.activity-feed {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    gap: 16px;
    padding: 12px;
    background: var(--bg-dark);
    border-radius: 8px;
}

.activity-time {
    color: var(--text-secondary);
    font-size: 12px;
    min-width: 80px;
}

.activity-text {
    color: var(--text-primary);
}

/* Opportunities Grid */
.opportunities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.opportunity-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.opportunity-card.placeholder {
    text-align: center;
    color: var(--text-secondary);
}

.opportunity-header {
    margin-bottom: 16px;
}

.opportunity-header h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.opportunity-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.btn-approve {
    flex: 1;
    background: var(--status-active);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
}

.btn-reject {
    flex: 1;
    background: var(--status-error);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
}

/* Approval Queue */
.approval-queue {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.approval-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.approval-item {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
}

.approval-item.placeholder {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px;
}

.approval-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.approval-header h4 {
    margin: 0;
    font-size: 18px;
    color: var(--text-primary);
}

.approval-type {
    background: var(--accent-yellow);
    color: var(--bg-dark);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.approval-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.approval-preview {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    font-family: monospace;
    font-size: 13px;
    color: var(--text-secondary);
    max-height: 200px;
    overflow-y: auto;
}

/* Settings */
.settings-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

/* Agent Circle Styles */
.agent-node {
    cursor: pointer;
    transition: all 0.3s;
    transform-origin: center;
}

.agent-node:hover .agent-circle {
    stroke-width: 3;
}

.agent-circle {
    stroke: var(--border);
    stroke-width: 2;
    transition: all 0.3s;
}

.agent-circle.idle {
    fill: #ff9800;
    filter: drop-shadow(0 0 8px rgba(255, 152, 0, 0.6));
}

.agent-circle.active {
    fill: #4caf50;
    filter: drop-shadow(0 0 12px rgba(76, 175, 80, 0.8));
    animation: pulse-glow 2s infinite;
}

.agent-circle.pending {
    fill: var(--status-pending);
    filter: drop-shadow(0 0 8px rgba(33, 150, 243, 0.6));
}

.agent-circle.error {
    fill: var(--status-error);
    filter: drop-shadow(0 0 8px rgba(244, 67, 54, 0.6));
}

.agent-label {
    font-size: 14px;
    font-weight: 600;
    fill: var(--text-primary);
    text-anchor: middle;
}

.agent-status {
    font-size: 11px;
    fill: var(--text-secondary);
    text-anchor: middle;
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.agent-pulse {
    animation: pulse-glow 2s ease-in-out infinite;
}
