/* Manager Ecosystem Visualization (Simulated Video) */
.product-ecosystem {
    padding: 80px 0;
    background: var(--bg-secondary);
    overflow: hidden;
}

.ecosystem-stage {
    margin-top: 40px;
    perspective: 1000px;
    display: flex;
    justify-content: center;
}

.device-frame {
    width: 90%;
    max-width: 1000px;
    height: 500px;
    background: #1e293b;
    border-radius: 20px 20px 0 0;
    padding: 15px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    position: relative;
    border: 1px solid #334155;
}

/* Screen Content */
.screen-content {
    background: #0f172a;
    height: 100%;
    width: 100%;
    border-radius: 8px;
    display: flex;
    overflow: hidden;
    position: relative;
}

.split-pane {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

/* Left Pane: Chat */
.left-pane {
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    flex: 0.8;
    /* Slightly smaller */
}

.pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.ph-title {
    font-weight: 700;
    color: #334155;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ph-status {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.scrolling-chat-container {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.scroll-wrapper {
    animation: scrollChat 8s linear infinite;
}

.chat-msg {
    padding: 10px 15px;
    border-radius: 12px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    max-width: 85%;
    line-height: 1.4;
}

.chat-msg.user {
    background: #f1f5f9;
    color: #334155;
    margin-right: auto;
    border-bottom-left-radius: 2px;
}

.chat-msg.ai {
    background: #eff6ff;
    color: #1e40af;
    margin-left: auto;
    border-bottom-right-radius: 2px;
    border: 1px solid #dbeafe;
}

.chat-msg.info {
    background: #fff7ed;
    color: #c2410c;
    text-align: center;
    width: 100%;
    font-size: 0.75rem;
    font-style: italic;
    border: 1px dashed #fdba74;
}

/* Right Pane: Manager Dash */
.right-pane {
    background: #f8fafc;
    flex: 1.2;
}

.dash-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    height: 100%;
}

.dash-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.kpi-card {
    align-items: center;
    justify-content: center;
}

.lbl {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.val {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
}

.graph-card {
    grid-column: span 2;
    position: relative;
    overflow: hidden;
}

.live-line-chart svg {
    width: 100%;
    height: 60px;
    stroke: #3b82f6;
    stroke-width: 2;
    fill: none;
}

.anim-line {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: drawLine 4s linear infinite;
}

.notify-card {
    grid-column: span 2;
    border-top: 3px solid #10b981;
}

.notification-stream {
    margin-top: 10px;
}

.notify-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    padding: 8px;
    border-radius: 6px;
    background: #f0fdf4;
    color: #166534;
    margin-bottom: 8px;
    opacity: 0;
    transform: translateX(20px);
}

.n-1 {
    animation: slideNotify 8s infinite 2s;
}

.n-2 {
    animation: slideNotify 8s infinite 4s;
}

.n-3 {
    animation: slideNotify 8s infinite 6s;
}

/* Animations */
@keyframes scrollChat {
    0% {
        transform: translateY(0);
    }

    15% {
        transform: translateY(0);
    }

    /* Pause read */
    100% {
        transform: translateY(-120%);
    }
}

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

@keyframes slideNotify {

    0%,
    90% {
        opacity: 0;
        transform: translateX(20px);
    }

    10%,
    80% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .screen-content {
        flex-direction: column;
        height: auto;
        overflow-y: auto;
    }

    .device-frame {
        height: auto;
        padding-bottom: 40px;
    }

    .left-pane,
    .right-pane {
        border: none;
        height: 300px;
    }
}