/* Futuristic Cyberpunk Dark Glassmorphism CSS */
:root {
    --bg-base: #06080d;
    --bg-card: rgba(14, 18, 29, 0.7);
    --border-color: rgba(255, 255, 255, 0.05);
    
    /* Neon Accent Colors */
    --accent-cyan: #06b6d4;      /* Cyan */
    --accent-blue: #3b82f6;      /* Blue */
    --accent-purple: #8b5cf6;    /* Purple */
    --accent-amber: #f59e0b;     /* Amber */
    --accent-pink: #f43f5e;      /* Pink */
    --accent-green: #10b981;     /* Green */
    
    /* Neon Glows */
    --glow-cyan: 0 0 15px rgba(6, 182, 212, 0.25);
    --glow-blue: 0 0 15px rgba(59, 130, 246, 0.25);
    --glow-purple: 0 0 15px rgba(139, 92, 246, 0.25);
    --glow-amber: 0 0 15px rgba(245, 158, 11, 0.25);
    --glow-pink: 0 0 15px rgba(244, 63, 94, 0.25);
    --glow-green: 0 0 15px rgba(16, 185, 129, 0.25);
    
    /* Text Colors */
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #475569;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 30px;
    background-image: 
        radial-gradient(at 10% 10%, rgba(139, 92, 246, 0.08) 0px, transparent 40%),
        radial-gradient(at 90% 90%, rgba(6, 182, 212, 0.05) 0px, transparent 40%);
    overflow-x: hidden;
}

/* Master Layout Wrapper */
.mission-control-wrapper {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Top Navigation Bar */
.top-navbar {
    display: flex;
    justify-content: center;
    margin-bottom: 5px;
}

.nav-pills {
    display: flex;
    background: rgba(14, 18, 29, 0.6);
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
}

.nav-pill {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 8px 24px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-pill:hover {
    color: #fff;
}

.nav-pill.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.03);
}

/* Status & Title Header */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
}

.status-indicator {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.pulse-dot.green {
    background-color: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
    animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.6; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.1); }
}

.system-title {
    color: var(--text-secondary);
    font-weight: 700;
}

.system-meta {
    color: var(--text-muted);
}

/* Card Styles */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px;
    backdrop-filter: blur(12px);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Row 1: Directives & Health Layout */
.overview-top-row {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
}

/* Directive Card (Radar) */
.directive-card {
    display: flex;
    gap: 30px;
    align-items: center;
}

/* Radar Widget */
.radar-section {
    flex-shrink: 0;
}

.radar-widget {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
    background: 
        radial-gradient(circle, transparent 20%, rgba(255, 255, 255, 0.02) 21%, rgba(255, 255, 255, 0.02) 40%, transparent 41%),
        radial-gradient(circle, transparent 60%, rgba(255, 255, 255, 0.02) 61%, rgba(255, 255, 255, 0.02) 80%, transparent 81%);
}

.radar-widget::before, .radar-widget::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.02);
}

.radar-widget::before {
    width: 100%;
    height: 1px;
    top: 50%;
    left: 0;
}

.radar-widget::after {
    width: 1px;
    height: 100%;
    left: 50%;
    top: 0;
}

.radar-sweep {
    width: 50%;
    height: 50%;
    background: conic-gradient(from 0deg, rgba(139, 92, 246, 0.25) 0deg, transparent 90deg);
    position: absolute;
    top: 0;
    left: 50%;
    transform-origin: bottom left;
    animation: rotateSweep 4s linear infinite;
    border-radius: 0 100% 0 0;
}

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

.radar-ping {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    position: absolute;
    animation: pingFade 4s infinite ease-in-out;
}

.radar-ping.p1 { top: 25%; left: 30%; background: var(--accent-pink); box-shadow: var(--glow-pink); animation-delay: 0.5s; }
.radar-ping.p2 { top: 60%; left: 20%; background: var(--accent-cyan); box-shadow: var(--glow-cyan); animation-delay: 1.5s; }
.radar-ping.p3 { top: 40%; left: 70%; background: var(--accent-purple); box-shadow: var(--glow-purple); animation-delay: 2.2s; }
.radar-ping.p4 { top: 75%; left: 55%; background: var(--accent-amber); box-shadow: var(--glow-amber); animation-delay: 3s; }
.radar-ping.p5 { top: 15%; left: 50%; background: var(--accent-green); box-shadow: var(--glow-green); animation-delay: 3.5s; }

@keyframes pingFade {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 1; }
}

.directive-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 1.5px;
}

.directive-text {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.orchestrator-status {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.orchestrator-header {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1.5px;
}

.progress-blocks {
    display: flex;
    gap: 4px;
}

.progress-blocks .block {
    height: 4px;
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 2px;
}

.progress-blocks .block.active {
    background: var(--accent-purple);
    box-shadow: 0 0 6px var(--accent-purple);
}

.last-status {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.completed-text {
    color: var(--accent-cyan);
}

/* Health Card */
.health-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 15px;
}

.health-card h3 {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 1.5px;
}

.health-metrics {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.metric-progress-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.metric-info {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary);
}

.progress-track {
    height: 3px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1.5px;
}

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

.progress-fill.cpu { background: var(--accent-blue); box-shadow: var(--glow-blue); }
.progress-fill.ram { background: var(--accent-purple); box-shadow: var(--glow-purple); }
.progress-fill.disk { background: var(--accent-cyan); box-shadow: var(--glow-cyan); }

.dbs-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.db-size {
    color: var(--accent-amber);
}

/* Stats Strip Bar */
.stats-strip {
    background: rgba(14, 18, 29, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    padding: 14px 24px;
    justify-content: space-between;
}

.strip-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.strip-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.strip-val {
    font-size: 13px;
    font-weight: 700;
}

.text-error {
    color: var(--accent-pink);
}

/* Glow Cards Row */
.glow-cards-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.glow-card {
    background: rgba(14, 18, 29, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.glow-card:hover {
    transform: translateY(-1px);
}

.glow-card-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.glow-label {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.glow-val {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.glow-sub {
    font-size: 8px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.glow-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 100%;
}

/* Specific glows matching mockup styling */
.integrity-card { border-bottom: 2px solid var(--accent-cyan); }
.integrity-card:hover { box-shadow: 0 0 20px rgba(6, 182, 212, 0.08); border-color: rgba(6, 182, 212, 0.4); }
.integrity-card .glow-val { color: var(--accent-cyan); }
.integrity-card .glow-bar { background: var(--accent-cyan); }

.calls-card { border-bottom: 2px solid var(--accent-blue); }
.calls-card:hover { box-shadow: 0 0 20px rgba(59, 130, 246, 0.08); border-color: rgba(59, 130, 246, 0.4); }
.calls-card .glow-val { color: var(--accent-blue); }
.calls-card .glow-bar { background: var(--accent-blue); }

.messages-card { border-bottom: 2px solid var(--accent-purple); }
.messages-card:hover { box-shadow: 0 0 20px rgba(139, 92, 246, 0.08); border-color: rgba(139, 92, 246, 0.4); }
.messages-card .glow-val { color: var(--accent-purple); }
.messages-card .glow-bar { background: var(--accent-purple); }

.tokens-card { border-bottom: 2px solid var(--accent-amber); }
.tokens-card:hover { box-shadow: 0 0 20px rgba(245, 158, 11, 0.08); border-color: rgba(245, 158, 11, 0.4); }
.tokens-card .glow-val { color: var(--accent-amber); }
.tokens-card .glow-bar { background: var(--accent-amber); }

.cache-card { border-bottom: 2px solid var(--accent-pink); }
.cache-card:hover { box-shadow: 0 0 20px rgba(244, 63, 94, 0.08); border-color: rgba(244, 63, 94, 0.4); }
.cache-card .glow-val { color: var(--accent-pink); }
.cache-card .glow-bar { background: var(--accent-pink); }

/* Row 3: Throughput & Activity layout */
.overview-bottom-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Throughput Chart */
.chart-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.chart-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chart-title {
    font-size: 24px;
    font-weight: 800;
}

.chart-wrapper {
    margin: 20px 0;
    position: relative;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.line-chart-svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

.chart-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLine 3s forwards ease-in-out;
}

@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}

.chart-footer {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* Activity Log Card */
.activity-card {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 330px;
}

.activity-stream {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding-right: 5px;
}

.activity-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    font-size: 11px;
    transition: background-color 0.2s ease;
}

.activity-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.activity-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.agent-badge {
    font-size: 8px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 1px;
    text-transform: uppercase;
    flex-shrink: 0;
}

/* Badge colors matching agent archetypes */
.badge-scout { background: rgba(59, 130, 246, 0.1); color: var(--accent-blue); border: 1px solid rgba(59, 130, 246, 0.2); }
.badge-dev { background: rgba(244, 63, 94, 0.1); color: var(--accent-pink); border: 1px solid rgba(244, 63, 94, 0.2); }
.badge-orchestrator { background: rgba(139, 92, 246, 0.1); color: var(--accent-purple); border: 1px solid rgba(139, 92, 246, 0.2); }
.badge-radar { background: rgba(245, 158, 11, 0.1); color: var(--accent-amber); border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-scribe { background: rgba(16, 185, 129, 0.1); color: var(--accent-green); border: 1px solid rgba(16, 185, 129, 0.2); }

.activity-text {
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
}

.activity-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.status-completed {
    color: var(--accent-green);
    font-weight: 700;
    font-size: 9px;
    letter-spacing: 0.5px;
}

.activity-time {
    color: var(--text-muted);
    font-weight: 600;
}

/* Agent Profiles Layout */
.profile-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 20px;
}

.profile-sidebar {
    display: flex;
    flex-direction: column;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.profile-list {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.profile-item {
    padding: 14px 18px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profile-item:last-child {
    border-bottom: none;
}

.profile-item:hover {
    background: rgba(255, 255, 255, 0.02);
    color: #fff;
}

.profile-item.active {
    background: rgba(139, 92, 246, 0.08);
    color: #fff;
    border-left: 2px solid var(--accent-purple);
}

.profile-editor-card {
    padding: 24px;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.soul-textarea {
    width: 100%;
    height: 460px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 18px;
    color: var(--text-primary);
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    line-height: 1.6;
    outline: none;
    resize: none;
}

.soul-textarea:focus {
    border-color: var(--accent-purple);
}

.soul-textarea:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Logs Layout */
.logs-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 20px;
}

.logs-selector {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

select {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    cursor: pointer;
}

select:focus {
    border-color: var(--accent-purple);
}

.terminal-card {
    padding: 0;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
}

.terminal-header {
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 18px;
    display: flex;
    align-items: center;
}

.terminal-buttons {
    display: flex;
    gap: 6px;
    margin-right: 18px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.terminal-title {
    font-size: 11px;
    color: var(--text-secondary);
    font-family: 'Fira Code', monospace;
}

.terminal-body {
    background: #04060b;
    padding: 18px;
    height: 480px;
    overflow-y: auto;
}

pre {
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    line-height: 1.6;
    color: #cbd5e1;
    white-space: pre-wrap;
}

/* Placeholders grid styles (Schedule & Content) */
.schedule-grid, .content-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge {
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--accent-green); border: 1px solid rgba(16, 185, 129, 0.2); }

.schedule-meta {
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    color: var(--accent-amber);
}

.content-thumbnail {
    font-size: 40px;
    margin-bottom: 12px;
    text-align: center;
}

/* Tab panes management */
.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: tabFadeIn 0.3s ease;
}

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

/* Button & UI utility Styles */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--accent-purple);
    color: #fff;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: #7c3aed;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 11px;
}

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-card);
    border: 1px solid var(--accent-purple);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.25);
    border-radius: 8px;
    padding: 16px 24px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    transform: translateY(16px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success { border-color: var(--accent-green); box-shadow: 0 8px 32px rgba(16, 185, 129, 0.25); }
.toast.error { border-color: var(--accent-pink); box-shadow: 0 8px 32px rgba(244, 63, 94, 0.25); }

.loading-state {
    text-align: center;
    padding: 32px;
    color: var(--text-muted);
}

.text-center { text-align: center; }
.m-t-1 { margin-top: 10px; }
.m-t-2 { margin-top: 20px; }
.m-t-3 { margin-top: 30px; }
.w-100 { width: 100%; }

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* === JOURNEY TIMELINE STYLE RULES === */
.journey-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
    height: calc(100vh - 160px);
    min-height: 580px;
}

.journey-sidebar {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.campaign-list {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    max-height: 420px;
}

.campaign-item {
    padding: 14px 18px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.campaign-item:last-child {
    border-bottom: none;
}

.campaign-item:hover {
    background: rgba(255, 255, 255, 0.02);
    color: #fff;
}

.campaign-item.active {
    background: rgba(139, 92, 246, 0.08);
    color: #fff;
    border-left: 3px solid var(--accent-purple);
}

.campaign-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
}

.campaign-date {
    font-family: 'Fira Code', monospace;
    color: var(--text-muted);
}

.badge-campaign-status {
    font-size: 8px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
}

.badge-planning { background: rgba(148, 163, 184, 0.1); color: var(--text-secondary); border: 1px solid rgba(148, 163, 184, 0.2); }
.badge-progress { background: rgba(59, 130, 246, 0.1); color: var(--accent-blue); border: 1px solid rgba(59, 130, 246, 0.2); }
.badge-review { background: rgba(245, 158, 11, 0.1); color: var(--accent-amber); border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-completed { background: rgba(16, 185, 129, 0.1); color: var(--accent-green); border: 1px solid rgba(16, 185, 129, 0.2); }

.journey-timeline-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.timeline-header-block {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.timeline-container {
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 10px;
}

.vertical-timeline {
    position: relative;
    padding-left: 30px;
    margin-left: 10px;
    border-left: 2px dashed rgba(255, 255, 255, 0.05);
}

.timeline-node {
    position: relative;
    margin-bottom: 30px;
    animation: nodeSlideIn 0.4s ease forwards;
    opacity: 0;
    transform: translateY(10px);
}

@keyframes nodeSlideIn {
    to { opacity: 1; transform: translateY(0); }
}

.timeline-node:last-child {
    margin-bottom: 10px;
}

/* Timeline marker node dot styling */
.node-marker {
    position: absolute;
    left: -36px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
    border: 2px solid var(--bg-base);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

/* Actor colored node markers */
.node-marker.actor-nova { background: var(--accent-purple); box-shadow: var(--glow-purple); }
.node-marker.actor-radar { background: var(--accent-amber); box-shadow: var(--glow-amber); }
.node-marker.actor-scribe { background: var(--accent-green); box-shadow: var(--glow-green); }
.node-marker.actor-pixel { background: var(--accent-blue); box-shadow: var(--glow-blue); }
.node-marker.actor-eka { background: var(--accent-cyan); box-shadow: var(--glow-cyan); }
.node-marker.actor-system { background: var(--accent-pink); box-shadow: var(--glow-pink); }

.node-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.node-time {
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    color: var(--text-muted);
}

.node-actor-badge {
    font-size: 8px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 3px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-actor-nova { background: rgba(139, 92, 246, 0.1); color: var(--accent-purple); border: 1px solid rgba(139, 92, 246, 0.2); }
.badge-actor-radar { background: rgba(245, 158, 11, 0.1); color: var(--accent-amber); border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-actor-scribe { background: rgba(16, 185, 129, 0.1); color: var(--accent-green); border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-actor-pixel { background: rgba(59, 130, 246, 0.1); color: var(--accent-blue); border: 1px solid rgba(59, 130, 246, 0.2); }
.badge-actor-eka { background: rgba(6, 182, 212, 0.1); color: var(--accent-cyan); border: 1px solid rgba(6, 182, 212, 0.2); }
.badge-actor-system { background: rgba(244, 63, 94, 0.1); color: var(--accent-pink); border: 1px solid rgba(244, 63, 94, 0.2); }

.node-action-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.node-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 14px 18px;
    transition: background-color 0.2s ease;
}

.node-card:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.04);
}

.node-details {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Artifact payload styling inside logs */
.node-payload {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(255, 255, 255, 0.04);
}

.payload-text-block {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 11px;
    color: #cbd5e1;
    margin-top: 6px;
}

.payload-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.keyword-tag {
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.15);
    color: #c084fc;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
}

.payload-image-container {
    margin-top: 8px;
    border-radius: 6px;
    overflow: hidden;
    max-width: 240px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.payload-image-container:hover {
    transform: scale(1.02);
    border-color: var(--accent-purple);
}

.payload-image-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* === MODAL DIALOG STYLE RULES === */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 4, 7, 0.85);
    backdrop-filter: blur(10px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    width: 780px;
    max-width: 90%;
    background: var(--bg-card);
    border: 1px solid var(--accent-purple);
    box-shadow: 0 16px 48px rgba(139, 92, 246, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    overflow: hidden;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    background: rgba(0, 0, 0, 0.25);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.modal-close {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--accent-pink);
}

.modal-body {
    padding: 24px;
}

/* === CRON SCHEDULE TAB === */
.schedule-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.schedule-header-bar h2 {
    margin: 0;
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 20px;
}

.schedule-item-card {
    padding: 20px;
    border: 1px solid rgba(6, 182, 212, 0.15);
    border-radius: 12px;
    background: rgba(14, 18, 29, 0.6);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.schedule-item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    border-radius: 12px 12px 0 0;
}
.schedule-item-card:hover {
    border-color: rgba(6, 182, 212, 0.35);
    box-shadow: var(--glow-cyan);
    transform: translateY(-2px);
}
.schedule-item-card.disabled-job {
    opacity: 0.5;
    border-color: rgba(255,255,255,0.05);
}
.schedule-item-card.disabled-job::before {
    background: rgba(100, 100, 100, 0.3);
}

.schedule-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.schedule-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.schedule-title-row h4 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.cron-expr {
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent-cyan);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    border: 1px solid rgba(6, 182, 212, 0.2);
    white-space: nowrap;
    flex-shrink: 0;
}

.cron-prompt {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    padding: 10px 12px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    border-left: 3px solid var(--accent-purple);
}

.cron-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.cron-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 8px;
    background: rgba(0,0,0,0.15);
    border-radius: 6px;
}
.cron-meta-item .meta-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.cron-meta-item .meta-value {
    font-size: 0.82rem;
    color: var(--text-primary);
    font-weight: 500;
}

.cron-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.cron-footer .job-id {
    margin-left: auto;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: monospace;
}

.badge-outline {
    background: transparent;
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: var(--accent-purple);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
}
.badge-info {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.loading-placeholder {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(6, 182, 212, 0.2);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}
.error-state {
    text-align: center;
    padding: 30px;
    color: var(--accent-pink);
}

@media (max-width: 768px) {
    .schedule-grid {
        grid-template-columns: 1fr;
    }
    .cron-meta-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .overview-top-row {
        grid-template-columns: 1fr;
    }
    .glow-cards-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .overview-bottom-row {
        grid-template-columns: 1fr;
    }
    .directive-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    .stats-footer {
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {
    .glow-cards-row {
        grid-template-columns: 1fr;
    }
    .top-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    #desktop-nav {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
}

/* Mobile Menu Styles */
.mobile-menu-btn {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: var(--text-primary);
    z-index: 100;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 641px) {
    .mobile-menu-btn {
        display: none !important;
    }
}

.mobile-slide-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-left: 1px solid rgba(255,255,255,0.1);
    z-index: 999;
    transition: right 0.3s ease;
    box-shadow: -5px 0 25px rgba(0,0,0,0.8);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.mobile-slide-menu.open {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 30px;
}

.mobile-menu-close {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 16px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-pills {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
}

.mobile-nav-pills .nav-pill {
    padding: 15px;
    font-size: 14px;
    text-align: center;
}
