/* Bank Pipeline Visualization Styles */

.pipeline-view {
    background: linear-gradient(180deg, #080808 0%, #101020 100%);
    min-height: 100vh;
}

#pipeline-hero {
    padding: 100px 0 40px;
    text-align: center;
    position: relative;
}

.pipeline-header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #80CFFF 0%, #C385FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-shadow: 0 0 30px rgba(128, 207, 255, 0.5);
}

.pipeline-header .subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.syncgrid-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(143, 0, 255, 0.2) 0%, rgba(0, 174, 239, 0.2) 100%);
    border: 1px solid rgba(143, 0, 255, 0.3);
    border-radius: 30px;
    padding: 8px 20px;
    margin-top: 15px;
    box-shadow: 0 0 20px rgba(143, 0, 255, 0.3);
}

.syncgrid-badge span {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-right: 5px;
}

.syncgrid-badge strong {
    font-size: 1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #8F00FF 0%, #00AEEF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.syncgrid-explainer {
    max-width: 550px;
    margin: 15px auto 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

#pipeline-dashboard {
    padding: 20px 0 80px;
}

.dashboard-controls {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-secondary);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tab-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    background: rgba(20, 20, 40, 0.3);
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow-x: auto;
}

.tab-btn {
    padding: 12px 24px;
    background-color: rgba(40, 40, 60, 0.5);
    border: 1px solid rgba(143, 0, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 100px;
    text-align: center;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.tab-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(143, 0, 255, 0.1), transparent);
    transition: width 0.3s ease;
}

.tab-btn:hover {
    background-color: rgba(60, 60, 80, 0.7);
    color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(143, 0, 255, 0.2);
}

.tab-btn:hover:before {
    width: 100%;
}

.tab-btn.active {
    background: linear-gradient(135deg, rgba(143, 0, 255, 0.8) 0%, rgba(0, 174, 239, 0.8) 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(143, 0, 255, 0.4);
    transform: translateY(-2px);
}

.tab-btn.active:before {
    display: none;
}

.metrics-bar {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--bg-primary);
    padding: 10px;
    border-radius: 5px;
    flex: 1;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.metric-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.visualization-container {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.visualization-wrapper {
    background: rgba(20, 20, 30, 0.7);
    border: 1px solid rgba(143, 0, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

#pipeline-visualization {
    width: 100%;
    height: 600px;
    position: relative;
}

.node {
    cursor: pointer;
    fill: #1a1a2e;
    stroke-width: 2px;
    transition: all 0.3s ease;
}

.node:hover {
    filter: brightness(1.3);
    transform: scale(1.05);
}

.node.frontend {
    stroke: #00AEEF;
}

.node.core {
    stroke: #64B5F6;
}

.node.syncgrid {
    stroke: #8F00FF;
    stroke-width: 3px;
    filter: drop-shadow(0 0 8px rgba(143, 0, 255, 0.5));
}

.node.processing {
    stroke: #8F00FF;
}

.node.analytics {
    stroke: #4CAF50;
}

.node.data {
    stroke: #FFC107;
}

.node.selected {
    filter: brightness(1.5);
    stroke-width: 3px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.node.operator-syncgrid {
    fill: rgba(143, 0, 255, 0.2);
}

.node.operator-bank {
    fill: #1a1a2e;
}

.node.operator-bank-managed {
    fill: #1a1a2e;
    stroke-dasharray: 3,2;
}

.node-label {
    font-size: 10px;
    fill: #ffffff;
    text-anchor: middle;
    pointer-events: none;
    font-family: 'Space Grotesk', sans-serif;
}

.link {
    stroke-opacity: 0.6;
    stroke-width: 1.5px;
    stroke: rgba(255, 255, 255, 0.3);
}

.link.active {
    stroke-opacity: 1;
    stroke-width: 2.5px;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.5));
}

.transaction-particle {
    fill: #8F00FF;
    r: 4;
}

.pipeline-legend {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(10, 10, 15, 0.8);
    border: 1px solid rgba(143, 0, 255, 0.2);
    border-radius: 8px;
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    display: inline-block;
}

.legend-color.frontend {
    background-color: #00AEEF;
}

.legend-color.syncgrid {
    background-color: #8F00FF;
    box-shadow: 0 0 10px rgba(143, 0, 255, 0.5);
}

.legend-color.core {
    background-color: #64B5F6;
}

.legend-color.processing {
    background-color: #8F00FF;
}

.legend-color.analytics {
    background-color: #4CAF50;
}

.legend-color.data {
    background-color: #FFC107;
}

.legend-label {
    font-size: 0.8rem;
    color: #fff;
}

.node-details {
    background: rgba(20, 20, 30, 0.7);
    border: 1px solid rgba(143, 0, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.node-details-content {
    height: 100%;
}

.node-details h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #fff;
    border-bottom: 1px solid rgba(143, 0, 255, 0.2);
    padding-bottom: 10px;
}

.node-details p {
    margin-bottom: 15px;
    color: var(--text-muted);
}

.node-details .detail-item {
    margin-bottom: 15px;
}

.node-details .detail-label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 3px;
    color: var(--text-muted);
}

.node-details .detail-value {
    display: block;
    font-size: 1.1rem;
    color: #fff;
}

.operator-tag {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
}

.operator-tag.syncgrid {
    background-color: rgba(143, 0, 255, 0.2);
    color: #8F00FF;
    border: 1px solid rgba(143, 0, 255, 0.5);
}

.operator-tag.bank {
    background-color: rgba(0, 174, 239, 0.2);
    color: #00AEEF;
    border: 1px solid rgba(0, 174, 239, 0.5);
}

.operator-tag.bank-managed {
    background-color: rgba(244, 67, 54, 0.1);
    color: #FFC107;
    border: 1px solid rgba(255, 193, 7, 0.5);
}

.syncgrid-orchestration-zone {
    pointer-events: none;
}

.orchestration-label {
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.8));
}

.node-stats {
    margin-top: 20px;
    border-top: 1px solid rgba(143, 0, 255, 0.2);
    padding-top: 15px;
}

.node-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.node-metric {
    background: rgba(10, 10, 15, 0.5);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.node-metric-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-light);
    display: block;
}

.node-metric-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.event-feed {
    background: rgba(20, 20, 30, 0.7);
    border: 1px solid rgba(143, 0, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

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

.feed-header h3 {
    font-size: 1.2rem;
    color: #fff;
}

.feed-controls {
    display: flex;
    gap: 10px;
}

.feed-controls .btn {
    font-size: 0.8rem;
    padding: 5px 10px;
}

.feed-container {
    height: 200px;
    overflow-y: auto;
    font-family: 'Space Grotesk', monospace;
    font-size: 0.9rem;
}

.event-item {
    padding: 10px;
    border-bottom: 1px solid rgba(143, 0, 255, 0.1);
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.event-time {
    color: var(--text-muted);
    white-space: nowrap;
}

.event-type {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.event-type.transaction {
    background-color: rgba(0, 174, 239, 0.2);
    color: #00AEEF;
}

.event-type.security {
    background-color: rgba(143, 0, 255, 0.2);
    color: #8F00FF;
}

.event-type.system {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.event-type.error {
    background-color: rgba(244, 67, 54, 0.2);
    color: #F44336;
}

.event-type.message {
    background-color: rgba(0, 174, 239, 0.2);
    color: #00AEEF;
}

.event-type.job {
    background-color: rgba(143, 0, 255, 0.2);
    color: #8F00FF;
}

.event-type.connector {
    background-color: rgba(255, 193, 7, 0.2);
    color: #FFC107;
}

.event-message {
    flex-grow: 1;
    color: #fff;
}

.event-item:hover {
    background: rgba(143, 0, 255, 0.05);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
}

.syncgrid-connection {
    filter: drop-shadow(0 0 3px rgba(143, 0, 255, 0.6));
}

.orchestration-explainer {
    filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.8));
}

/* Responsive styles */
@media (max-width: 1200px) {
    .visualization-container {
        grid-template-columns: 1fr;
    }

    .node-details {
        height: auto;
    }
}

@media (max-width: 992px) {
    .dashboard-controls {
        flex-direction: column;
        gap: 15px;
    }

    .metrics-bar {
        width: 100%;
        justify-content: space-between;
    }

    #pipeline-visualization {
        height: 500px;
    }
}

@media (max-width: 768px) {
    .control-buttons {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .metrics-bar {
        flex-wrap: wrap;
        gap: 15px 20px;
    }

    .metric {
        min-width: 140px;
    }

    #pipeline-visualization {
        height: 400px;
    }
}

/* Tab Views */
.tab-container {
    background-color: var(--bg-primary);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.tab-view {
    display: none;
    border-radius: 12px;
    background: rgba(30, 30, 50, 0.4);
    border: 1px solid rgba(143, 0, 255, 0.2);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: all 0.3s ease;
}

.tab-view.active {
    display: block;
}

/* Topics Tab */
.topics-container {
    padding: 20px;
}

.topics-container h2 {
    margin-bottom: 5px;
    font-size: 22px;
    background: linear-gradient(135deg, #80CFFF 0%, #C385FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

.topics-list {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.topic-item {
    background: rgba(30, 30, 50, 0.6);
    border: 1px solid rgba(143, 0, 255, 0.2);
    border-radius: 10px;
    padding: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.topic-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(143, 0, 255, 0.2);
    border-color: rgba(143, 0, 255, 0.4);
}

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

.topic-name {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.topic-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.topic-badge.active {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.4);
}

.topic-badge.warning {
    background: rgba(255, 193, 7, 0.2);
    color: #FFC107;
    border: 1px solid rgba(255, 193, 7, 0.4);
}

.topic-details {
    display: flex;
    justify-content: space-between;
}

.topic-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #80CFFF 0%, #C385FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 5px;
}

/* Jobs Tab */
.jobs-container {
    padding: 20px;
}

.jobs-container h2 {
    margin-bottom: 5px;
    font-size: 22px;
    background: linear-gradient(135deg, #80CFFF 0%, #C385FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

.jobs-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.job-item {
    background: rgba(30, 30, 50, 0.6);
    border: 1px solid rgba(143, 0, 255, 0.2);
    border-radius: 10px;
    padding: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.job-id {
    font-family: monospace;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.job-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.job-badge.running {
    background: rgba(33, 150, 243, 0.2);
    color: #2196F3;
    border: 1px solid rgba(33, 150, 243, 0.4);
}

.job-badge.completed {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.4);
}

.job-badge.failed {
    background: rgba(244, 67, 54, 0.2);
    color: #F44336;
    border: 1px solid rgba(244, 67, 54, 0.4);
}

.job-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #fff;
}

.job-progress {
    margin-bottom: 15px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00AEEF, #8F00FF);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-fill.failed {
    background: linear-gradient(90deg, #F44336, #FF9800);
}

.progress-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-align: right;
}

.job-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.job-detail {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.job-detail span {
    color: rgba(255, 255, 255, 0.5);
    margin-right: 5px;
}

.job-detail.error {
    color: #F44336;
}

/* Analytics Tab */
.analytics-container {
    padding: 20px;
}

.analytics-container h2 {
    margin-bottom: 5px;
    font-size: 22px;
    background: linear-gradient(135deg, #80CFFF 0%, #C385FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

.analytics-charts {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.analytics-card {
    background: rgba(30, 30, 50, 0.6);
    border: 1px solid rgba(143, 0, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.analytics-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(143, 0, 255, 0.2);
    border-color: rgba(143, 0, 255, 0.4);
}

.analytics-card-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(143, 0, 255, 0.1);
}

.analytics-card-header h3 {
    font-size: 18px;
    margin: 0;
    color: #fff;
}

.analytics-card-content {
    padding: 20px;
}

.analytics-summary {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

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

.summary-value {
    font-size: 24px;
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
    background: linear-gradient(135deg, #80CFFF 0%, #C385FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.summary-value.trend-up {
    color: #4CAF50;
    -webkit-text-fill-color: #4CAF50;
}

.summary-value.trend-down {
    color: #F44336;
    -webkit-text-fill-color: #F44336;
}

.summary-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

/* Monitoring Tab */
.monitoring-container {
    padding: 20px;
}

.monitoring-container h2 {
    margin-bottom: 5px;
    font-size: 22px;
    background: linear-gradient(135deg, #80CFFF 0%, #C385FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

.monitoring-dashboard {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.monitoring-card {
    background: rgba(30, 30, 50, 0.6);
    border: 1px solid rgba(143, 0, 255, 0.2);
    border-radius: 10px;
    padding: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.monitoring-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(143, 0, 255, 0.2);
    border-color: rgba(143, 0, 255, 0.4);
}

.monitoring-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.monitoring-card-header h3 {
    font-size: 18px;
    margin: 0;
    color: #fff;
}

.status-indicator {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-indicator.healthy {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.4);
}

.status-indicator.warning {
    background: rgba(255, 193, 7, 0.2);
    color: #FFC107;
    border: 1px solid rgba(255, 193, 7, 0.4);
}

.monitoring-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.monitoring-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.monitoring-stat .stat-value {
    font-size: 18px;
} 