
			:root {
				--bg-dark: #0a0a0a;
				--bg-panel: #0d0d0d;
				--bg-message: #141414;

				/* FAIGEN PURPLE */
				--accent: #9b5cff;
				--accent-bright: #b879ff;
				--accent-deep: #7c3aed;
				--accent-glow: rgba(155, 92, 255, 0.35);

				/* OTHER AGENTS — PRESERVED */
				--accent-blue: #007bff;
				--accent-red: #dc3545;

				--border: #222222;
				--text: #ececec;
				--text-dim: #555;
			}

			* {
				box-sizing: border-box;
				-webkit-tap-highlight-color: transparent;
			}

			body, html {
				margin: 0;
				padding: 0;
				height: 100%;
				background: var(--bg-dark);
				color: var(--text);
				font-family: 'Inter', sans-serif;
				overflow: hidden;
			}

			.app-wrapper {
				display: flex;
				height: 100dvh;
				width: 100vw;
				position: relative;
				overflow: hidden;
			}

			/* SIDEBAR */
			#sidebar {
				width: 260px;
				background: var(--bg-panel);
				border-right: 1px solid var(--border);
				display: flex;
				flex-direction: column;
				transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
				z-index: 2000;
			}

			.sidebar-header {
				padding: 25px 20px;
				border-bottom: 1px solid var(--border);
				display: flex;
				justify-content: space-between;
				align-items: center;
				background: #000;
				font-weight: 800;
				color: var(--accent);
				font-size: 0.7rem;
				letter-spacing: 2px;
				text-shadow: 0 0 12px var(--accent-glow);
			}

			#history-rail {
				flex-grow: 1;
				overflow-y: auto;
				padding: 15px 10px;
			}

			.rail-label {
				font-size: 0.6rem;
				color: var(--text-dim);
				padding: 0 10px 10px;
				text-transform: uppercase;
				letter-spacing: 1px;
			}

			.history-item {
				padding: 10px 12px;
				font-size: 0.75rem;
				margin-bottom: 4px;
				border-radius: 8px;
				cursor: pointer;
				white-space: nowrap;
				overflow: hidden;
				text-overflow: ellipsis;
				color: #888;
				border: 1px solid transparent;
				transition: 0.2s;
			}

			.history-item:hover {
				color: var(--accent);
				background: rgba(155, 92, 255, 0.05);
				border-color: rgba(155, 92, 255, 0.1);
			}

			.sidebar-footer {
				padding: 20px;
				border-top: 1px solid var(--border);
				font-size: 0.6rem;
				color: #444;
				background: #080808;
			}

			/* MAIN AREA */
			#main-viewport {
				flex: 1;
				display: flex;
				flex-direction: column;
				min-width: 0;
				height: 100dvh;
				transition: flex 0.4s cubic-bezier(0.4, 0, 0.2, 1);
			}

			header {
				padding: 15px 25px;
				border-bottom: 1px solid var(--border);
				display: flex;
				justify-content: space-between;
				align-items: center;
				background: rgba(10, 10, 10, 0.8);
				backdrop-filter: blur(10px);
			}

			.metric-bar {
				display: flex;
				justify-content: space-between;
				align-items: center;
				gap: 20px;
				padding: 8px 25px;
				background: #000;
				border-bottom: 1px solid var(--border);
				font-family: 'JetBrains Mono', monospace;
				font-size: 0.65rem;
				color: var(--accent);
			}

			.metric-info {
				display: flex;
				gap: 20px;
			}

			/* Agent Selection Controls */
			.agent-selector {
				display: flex;
				gap: 5px;
				background: #0d0d0d;
				padding: 3px;
				border-radius: 6px;
				border: 1px solid var(--border);
			}

			.agent-btn {
				background: transparent;
				border: none;
				color: #666;
				padding: 4px 10px;
				font-family: 'JetBrains Mono', monospace;
				font-size: 0.6rem;
				font-weight: bold;
				border-radius: 4px;
				cursor: pointer;
				transition: all 0.2s ease;
			}

			.agent-btn[data-agent="core"].active {
				background: rgba(155, 92, 255, 0.15);
				color: var(--accent);
				border: 1px solid rgba(155, 92, 255, 0.3);
				box-shadow: 0 0 12px rgba(155, 92, 255, 0.08);
			}

			.agent-btn[data-agent="blue"].active {
				background: rgba(0, 123, 255, 0.15);
				color: #3395ff;
				border: 1px solid rgba(0, 123, 255, 0.3);
			}

			.agent-btn[data-agent="red"].active {
				background: rgba(220, 53, 69, 0.15);
				color: #ff4d5e;
				border: 1px solid rgba(220, 53, 69, 0.3);
			}

			#chat-container {
				flex: 1 1 auto;
				overflow-y: auto;
				display: flex;
				flex-direction: column;
				background: var(--bg-dark);
				scroll-behavior: smooth;
				min-height: 0;
			}

			.msg-row {
				padding: 25px 12%;
				display: flex;
				gap: 18px;
				border-bottom: 1px solid #151515;
				position: relative;
				animation: fadeIn 0.3s ease;
			}

			.msg-row.brain-ai {
				background: var(--bg-message);
			}

			.avatar {
				width: 34px;
				height: 34px;
				border-radius: 6px;
				display: flex;
				align-items: center;
				justify-content: center;
				flex-shrink: 0;
				font-size: 0.9rem;
			}

			.brain-icon {
				background: var(--accent);
				color: white;
				box-shadow: 0 0 14px rgba(155, 92, 255, 0.35);
			}

			.brain-icon.blue-agent {
				background: var(--accent-blue);
				color: white;
				box-shadow: 0 0 10px rgba(0, 123, 255, 0.3);
			}

			.brain-icon.red-agent {
				background: var(--accent-red);
				color: white;
				box-shadow: 0 0 10px rgba(220, 53, 69, 0.3);
			}

			.user-icon {
				background: #2a2a2a;
				color: white;
			}

			.msg-content {
				flex: 1;
				min-width: 0;
			}

			.msg-meta {
				font-size: 0.6rem;
				font-weight: bold;
				color: var(--text-dim);
				margin-bottom: 8px;
				display: flex;
				justify-content: space-between;
				align-items: center;
				text-transform: uppercase;
			}

			.tts-btn {
				background: transparent;
				border: 1px solid var(--border);
				color: var(--text-dim);
				padding: 2px 8px;
				border-radius: 4px;
				cursor: pointer;
				font-size: 0.55rem;
				font-family: 'JetBrains Mono', monospace;
				transition: 0.2s;
				display: inline-flex;
				align-items: center;
				gap: 4px;
			}

			.tts-btn:hover {
				color: var(--accent);
				border-color: rgba(155, 92, 255, 0.3);
				background: rgba(155, 92, 255, 0.05);
			}

			.tts-btn.speaking {
				color: var(--accent);
				border-color: var(--accent);
				background: rgba(155, 92, 255, 0.1);
				animation: pulseGlow 1.5s infinite;
			}

			@keyframes pulseGlow {
				0% {
					box-shadow: 0 0 0 0 rgba(155, 92, 255, 0.4);
				}
				70% {
					box-shadow: 0 0 0 6px rgba(155, 92, 255, 0);
				}
				100% {
					box-shadow: 0 0 0 0 rgba(155, 92, 255, 0);
				}
			}

			.token-tag {
				color: var(--accent);
				font-family: 'JetBrains Mono', monospace;
			}

			.msg-row.agent-blue-row .token-tag {
				color: #3395ff;
			}

			.msg-row.agent-red-row .token-tag {
				color: #ff4d5e;
			}

			.msg-text {
				font-size: 0.95rem;
				line-height: 1.6;
				white-space: pre-wrap;
				margin-bottom: 8px;
			}

			.msg-footer {
				display: flex;
				justify-content: flex-end;
				font-size: 0.6rem;
				font-family: monospace;
				color: #333;
			}

			.thinking-ui {
				color: var(--accent);
				font-size: 0.85rem;
				display: flex;
				align-items: center;
				gap: 10px;
			}

			/* INPUT AREA */
			.input-dock {
				padding: 20px 12%;
				background: var(--bg-dark);
				border-top: 1px solid var(--border);
			}

			.input-shell {
				background: #181818;
				border: 1px solid var(--border);
				border-radius: 14px;
				padding: 10px 18px;
				display: flex;
				align-items: flex-end;
				gap: 12px;
				transition: border-radius 0.2s ease;
			}

			.input-shell:focus-within {
				border-color: rgba(155, 92, 255, 0.5);
				box-shadow: 0 0 18px rgba(155, 92, 255, 0.06);
			}

			textarea {
				flex: 1;
				background: transparent;
				border: none;
				color: #fff;
				outline: none;
				resize: none;
				font-size: 16px;
				line-height: 1.5;
				max-height: 160px;
			}

			.icon-btn {
				background: none;
				border: none;
				color: #444;
				cursor: pointer;
				font-size: 1.2rem;
				transition: 0.2s;
			}

			.icon-btn:hover {
				color: var(--accent);
			}

			/* CANVAS RIGHT PANEL */
			#code-canvas {
				width: 0;
				background: white;
				border-left: 1px solid var(--border);
				transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
				display: flex;
				flex-direction: column;
				position: relative;
				overflow: hidden;
			}

			#code-canvas.active {
				width: 45%;
			}

			#code-canvas.expanded {
				position: fixed;
				inset: 0;
				width: 100%;
				height: 100vh;
				z-index: 9999;
				border: none;
				box-shadow: 0 0 0 1px rgba(155,92,255,0.25), 0 30px 100px rgba(0,0,0,0.65);
			}

			.canvas-header {
				background: #f8f9fa;
				padding: 10px 15px;
				border-bottom: 1px solid #ddd;
				display: flex;
				justify-content: space-between;
				align-items: center;
				color: #333;
				font-size: 0.7rem;
				font-weight: bold;
				min-height: 42px;
			}

			.canvas-actions {
				display: flex;
				align-items: center;
				gap: 8px;
			}

			.canvas-action-btn {
				background: transparent;
				border: 0;
				color: #555;
				cursor: pointer;
				width: 30px;
				height: 30px;
				border-radius: 7px;
				display: inline-flex;
				align-items: center;
				justify-content: center;
				transition: 0.2s ease;
			}

			.canvas-action-btn:hover {
				background: rgba(155,92,255,0.1);
				color: #9b5cff;
			}

			.faigen-preview-action {
				margin-top: 14px;
			}

			.faigen-preview-btn {
				font-size: 0.75rem;
				font-family: 'Courier New', monospace;
				border-color: var(--accent);
				color: var(--accent);
				transition: 0.2s ease;
			}

			.faigen-preview-btn:hover {
				background: var(--accent);
				color: #111;
				box-shadow: 0 0 18px rgba(155,92,255,0.18);
			}

			iframe#sandbox {
				flex: 1;
				width: 100%;
				border: none;
				background: white;
			}

			@media (max-width: 768px) {
				#sidebar {
					position: absolute;
					left: -260px;
					height: 100%;
					width: 260px;
				}

				#sidebar.open {
					left: 0;
				}

				.msg-row {
					padding: 20px 5%;
				}

				.input-dock {
					padding: 15px 5%;
				}

				.mobile-toggle {
					display: block !important;
				}

				#code-canvas.active {
					width: 100%;
					position: absolute;
					right: 0;
					z-index: 3000;
				}

				.metric-bar {
					flex-direction: column;
					align-items: flex-start;
					gap: 8px;
				}
			}

			.mobile-toggle {
				display: none;
				background: none;
				border: none;
				color: var(--accent);
				font-size: 1.3rem;
			}

			.input-footer {
				font-size: 0.65rem;
				color: rgba(255, 255, 255, 0.4);
				margin-top: 8px;
				font-family: 'Inter', sans-serif;
				letter-spacing: 0.3px;
				text-align: center;
			}

			.input-footer:hover {
				color: rgba(255, 255, 255, 0.6);
				transition: color 0.3s ease;
			}
			.topbar-faigen-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
}
.topbar-faigen-icon {
    width: 25px;
    height: 25px;
    min-width: 25px;
    flex: 0 0 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    color: #c77dff;
    background: rgba(150, 66, 220, .12);
    box-shadow: 0 0 12px rgba(170, 75, 255, .18);
    font-size: 13px;
    line-height: 1;
    box-sizing: border-box;
}
* {
    box-sizing: border-box;
}
* {
    box-sizing: border-box;
}
*, ::after, ::before {
    box-sizing: border-box;
}
@media (max-width: 600px) {
    #faigenTopbarButton {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 42px !important;
        min-width: 42px !important;
        max-width: 42px !important;
        height: 40px !important;
        padding: 0 !important;
        margin: 0 !important;
        gap: 0 !important;
        overflow: visible !important;
        color: #ffffff !important;
    }
    /* =========================================================
   FAIGEN TOPBAR — BRAIN ICON GLOW
   ========================================================= */

.topbar-faigen-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
}


/* ---------------------------------------------------------
   BRAIN
   --------------------------------------------------------- */

.topbar-faigen-icon .fa-brain {
    position: relative;
    z-index: 2;

    font-size: 20px;

    color: #c45cff !important;

    text-shadow:
        0 0 5px rgba(196, 92, 255, 1),
        0 0 10px rgba(196, 92, 255, 0.95),
        0 0 18px rgba(196, 92, 255, 0.80),
        0 0 30px rgba(196, 92, 255, 0.55);

    filter:
        drop-shadow(0 0 5px rgba(196, 92, 255, 0.95))
        drop-shadow(0 0 12px rgba(196, 92, 255, 0.75));

    animation: faigenBrainPulse 2.2s ease-in-out infinite;
}


/* ---------------------------------------------------------
   SOFT GLOW BEHIND THE BRAIN
   --------------------------------------------------------- */

.topbar-faigen-icon::before {
    content: "";

    position: absolute;

    width: 22px;
    height: 22px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(196, 92, 255, 0.42) 0%,
            rgba(196, 92, 255, 0.18) 35%,
            rgba(196, 92, 255, 0.05) 60%,
            transparent 75%
        );

    filter: blur(5px);

    animation: faigenBrainAura 2.2s ease-in-out infinite;

    pointer-events: none;
}


/* ---------------------------------------------------------
   BRAIN PULSE
   --------------------------------------------------------- */

@keyframes faigenBrainPulse {

    0%,
    100% {
        color: #b84cff !important;

        transform: scale(1);

        text-shadow:
            0 0 4px rgba(184, 76, 255, 0.85),
            0 0 9px rgba(184, 76, 255, 0.75),
            0 0 18px rgba(184, 76, 255, 0.55);

        filter:
            drop-shadow(0 0 4px rgba(184, 76, 255, 0.85))
            drop-shadow(0 0 10px rgba(184, 76, 255, 0.55));
    }

    50% {
        color: #e28aff !important;

        transform: scale(1.10);

        text-shadow:
            0 0 5px rgba(226, 138, 255, 1),
            0 0 12px rgba(226, 138, 255, 1),
            0 0 24px rgba(196, 92, 255, 0.90),
            0 0 38px rgba(196, 92, 255, 0.65);

        filter:
            drop-shadow(0 0 6px rgba(226, 138, 255, 1))
            drop-shadow(0 0 16px rgba(196, 92, 255, 0.85));
    }
}


/* ---------------------------------------------------------
   AURA PULSE
   --------------------------------------------------------- */

@keyframes faigenBrainAura {

    0%,
    100% {
        transform: scale(0.85);
        opacity: 0.45;
    }

    50% {
        transform: scale(1.35);
        opacity: 1;
    }
}


/* =========================================================
   HOVER — SUPERCHARGE THE FAIGEN BRAIN
   ========================================================= */

#faigenTopbarButton:hover .topbar-faigen-icon .fa-brain {
    color: #f0b3ff !important;

    transform: scale(1.16);

    text-shadow:
        0 0 6px rgba(240, 179, 255, 1),
        0 0 14px rgba(226, 138, 255, 1),
        0 0 26px rgba(196, 92, 255, 1),
        0 0 45px rgba(196, 92, 255, 0.85);

    filter:
        drop-shadow(0 0 8px rgba(240, 179, 255, 1))
        drop-shadow(0 0 20px rgba(196, 92, 255, 1));
}


/* =========================================================
   FAIGEN STATUS — AI
   ========================================================= */

.topbar-faigen-status {
    text-shadow:
        0 0 5px rgba(196, 92, 255, 0.8),
        0 0 10px rgba(196, 92, 255, 0.5);
}

		
	/* =========================================================
   FAIGEN CORE — COMPLETE SIDEBAR CSS
   ========================================================= */



		/* =========================================================
		   FAIGEN EMPTY STATE OVERRIDES
		   ========================================================= */

		.faigen-empty-state {
			color: #ffffff;
			background:
				radial-gradient(
					circle at 50% 15%,
					rgba(155, 92, 255, 0.09),
					transparent 35%
				),
				#0b0810;
		}

		.faigen-empty-state .faigen-purple {
			color: var(--accent-bright) !important;
		}

		.faigen-empty-state .faigen-purple-border {
			border-color: rgba(155, 92, 255, 0.3) !important;
		}

		.faigen-empty-state .faigen-purple-bg {
			color: var(--accent-bright) !important;
		}
		/* ============================================================
   FAIGEN WORKSPACE PANEL
   ============================================================ */

#faigen-workspace-panel {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(5, 5, 8, 0.92);
    backdrop-filter: blur(18px);
    opacity: 0;
    transition: opacity 0.2s ease;
}

#faigen-workspace-panel.visible {
    opacity: 1;
}

.workspace-panel-inner {
    width: min(1100px, calc(100% - 40px));
    height: min(760px, calc(100% - 40px));
    margin: 20px auto;
    background: #0d0d12;
    border: 1px solid #25252d;
    border-radius: 18px;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.workspace-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 26px;
    border-bottom: 1px solid #222229;
}

.workspace-panel-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.workspace-panel-title h2 {
    margin: 0;
    color: #fff;
    font-size: 22px;
}

.workspace-panel-title p {
    margin: 5px 0 0;
    color: #777;
    font-size: 13px;
}

.workspace-panel-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(155, 92, 255, 0.12);
    color: var(--accent);
    font-size: 18px;
}

.workspace-panel-close {
    width: 38px;
    height: 38px;
    border: 1px solid #292930;
    border-radius: 10px;
    background: #15151b;
    color: #888;
    cursor: pointer;
}

.workspace-panel-close:hover {
    color: #fff;
    border-color: var(--accent);
}

.workspace-panel-content {
    height: calc(100% - 89px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.workspace-empty {
    text-align: center;
    max-width: 420px;
}

.workspace-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(155, 92, 255, 0.08);
    border: 1px solid rgba(155, 92, 255, 0.2);
    color: var(--accent);
    font-size: 30px;
}

.workspace-empty h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 24px;
}

.workspace-empty p {
    margin: 0;
    color: #777;
    line-height: 1.6;
}

.workspace-coming-soon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    padding: 8px 14px;
    border: 1px solid #292930;
    border-radius: 20px;
    color: #888;
    font-size: 10px;
    letter-spacing: 1px;
}
/* ============================================================
   FAIGEN WORKSPACE PANEL
   ============================================================ */

#faigen-workspace-panel {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px;

    background:
        radial-gradient(
            circle at 50% 20%,
            rgba(155, 92, 255, 0.08),
            transparent 45%
        ),
        rgba(0, 0, 0, 0.78);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
}


#faigen-workspace-panel.visible {
    opacity: 1;
    visibility: visible;
}


/* ============================================================
   MAIN PANEL
   ============================================================ */

.workspace-panel-inner {
    width: min(1180px, 100%);
    max-height: min(820px, calc(100vh - 60px));

    display: flex;
    flex-direction: column;

    background:
        linear-gradient(
            145deg,
            rgba(20, 20, 24, 0.98),
            rgba(10, 10, 12, 0.99)
        );

    border: 1px solid rgba(155, 92, 255, 0.20);
    border-radius: 18px;

    box-shadow:
        0 35px 100px rgba(0, 0, 0, 0.75),
        0 0 80px rgba(155, 92, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);

    overflow: hidden;

    transform: translateY(12px) scale(0.985);

    transition:
        transform 0.22s ease;
}


#faigen-workspace-panel.visible .workspace-panel-inner {
    transform: translateY(0) scale(1);
}


/* ============================================================
   HEADER
   ============================================================ */

.workspace-panel-header {
    min-height: 92px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 20px 24px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.06);

    background:
        linear-gradient(
            90deg,
            rgba(155, 92, 255, 0.06),
            transparent 45%
        );

    position: relative;
}


.workspace-panel-header::after {
    content: "";

    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(155, 92, 255, 0.45),
            transparent
        );

    opacity: 0.5;
}


.workspace-panel-title {
    display: flex;
    align-items: center;
    gap: 15px;
}


.workspace-panel-icon {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 13px;

    color: var(--accent-bright);

    background:
        linear-gradient(
            145deg,
            rgba(155, 92, 255, 0.18),
            rgba(124, 58, 237, 0.08)
        );

    border: 1px solid rgba(155, 92, 255, 0.25);

    box-shadow:
        0 0 25px rgba(155, 92, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);

    font-size: 19px;
}


.workspace-panel-title h2 {
    margin: 0;

    color: #f3f3f5;

    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.3px;
}


.workspace-panel-title p {
    margin: 4px 0 0;

    color: #777782;

    font-size: 13px;
}


.workspace-panel-close {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;

    background: rgba(255, 255, 255, 0.025);

    color: #777;

    cursor: pointer;

    transition:
        color 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}


.workspace-panel-close:hover {
    color: #fff;

    background: rgba(220, 53, 69, 0.10);

    border-color: rgba(220, 53, 69, 0.30);

    transform: rotate(3deg);
}


/* ============================================================
   CONTENT
   ============================================================ */

.workspace-panel-content {
    flex: 1;

    min-height: 0;

    overflow-y: auto;

    padding: 24px;

    scrollbar-width: thin;
    scrollbar-color: rgba(155, 92, 255, 0.25) transparent;
}


.workspace-panel-content::-webkit-scrollbar {
    width: 7px;
}


.workspace-panel-content::-webkit-scrollbar-track {
    background: transparent;
}


.workspace-panel-content::-webkit-scrollbar-thumb {
    background: rgba(155, 92, 255, 0.22);
    border-radius: 10px;
}


.workspace-panel-content::-webkit-scrollbar-thumb:hover {
    background: rgba(155, 92, 255, 0.38);
}


/* ============================================================
   TOOLBAR
   ============================================================ */

.workspace-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 24px;
}


.workspace-search {
    flex: 1;
    max-width: 470px;

    height: 42px;

    display: flex;
    align-items: center;

    gap: 10px;

    padding: 0 14px;

    background: rgba(255, 255, 255, 0.025);

    border: 1px solid rgba(255, 255, 255, 0.08);

    border-radius: 10px;

    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}


.workspace-search:focus-within {
    border-color: rgba(155, 92, 255, 0.42);

    background: rgba(155, 92, 255, 0.035);

    box-shadow:
        0 0 0 3px rgba(155, 92, 255, 0.07);
}


.workspace-search i {
    color: #666;

    font-size: 13px;
}


.workspace-search input {
    width: 100%;

    border: 0;
    outline: 0;

    background: transparent;

    color: #eee;

    font-family: inherit;
    font-size: 13px;
}


.workspace-search input::placeholder {
    color: #555;
}


.workspace-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}


.workspace-toolbar select {
    height: 42px;

    padding: 0 34px 0 12px;

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;

    background: #111114;

    color: #aaa;

    outline: none;

    font-family: inherit;
    font-size: 12px;

    cursor: pointer;
}


.workspace-toolbar select:focus {
    border-color: rgba(155, 92, 255, 0.35);
}


/* ============================================================
   BUTTONS
   ============================================================ */

.workspace-primary-btn,
.workspace-secondary-btn {
    height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 0 15px;

    border-radius: 10px;

    font-family: inherit;
    font-size: 12px;
    font-weight: 600;

    cursor: pointer;

    transition:
        transform 0.16s ease,
        background 0.16s ease,
        border-color 0.16s ease,
        box-shadow 0.16s ease;
}


.workspace-primary-btn {
    border: 1px solid rgba(155, 92, 255, 0.38);

    background:
        linear-gradient(
            135deg,
            rgba(155, 92, 255, 0.25),
            rgba(124, 58, 237, 0.18)
        );

    color: #eee;

    box-shadow:
        0 5px 20px rgba(124, 58, 237, 0.10);
}


.workspace-primary-btn:hover {
    background:
        linear-gradient(
            135deg,
            rgba(155, 92, 255, 0.36),
            rgba(124, 58, 237, 0.27)
        );

    border-color: rgba(155, 92, 255, 0.58);

    transform: translateY(-1px);

    box-shadow:
        0 8px 28px rgba(124, 58, 237, 0.16);
}


.workspace-secondary-btn {
    border: 1px solid rgba(255, 255, 255, 0.09);

    background: rgba(255, 255, 255, 0.035);

    color: #aaa;
}


.workspace-secondary-btn:hover {
    color: #eee;

    background: rgba(255, 255, 255, 0.06);

    border-color: rgba(255, 255, 255, 0.14);
}


.workspace-primary-btn:active,
.workspace-secondary-btn:active {
    transform: translateY(0);
}


/* ============================================================
   SECTION LABEL
   ============================================================ */

.workspace-section-label {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin: 4px 2px 12px;

    color: #4f4f58;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 1.3px;
}


.workspace-section-label span:last-child {
    color: #555560;

    font-size: 9px;

    letter-spacing: 0.8px;
}


/* ============================================================
   CARD GRID
   ============================================================ */

.workspace-card-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(270px, 1fr)
        );

    gap: 14px;

    margin-bottom: 26px;
}


/* ============================================================
   BASE CARD
   ============================================================ */

.workspace-card {
    position: relative;

    min-height: 190px;

    display: flex;
    flex-direction: column;

    border: 1px solid rgba(255, 255, 255, 0.07);

    border-radius: 14px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.035),
            rgba(255, 255, 255, 0.012)
        );

    overflow: hidden;

    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}


.workspace-card:hover {
    transform: translateY(-2px);

    border-color: rgba(155, 92, 255, 0.22);

    background:
        linear-gradient(
            145deg,
            rgba(155, 92, 255, 0.055),
            rgba(255, 255, 255, 0.015)
        );

    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.24),
        0 0 25px rgba(155, 92, 255, 0.035);
}


/* ============================================================
   CARD TOP
   ============================================================ */

.workspace-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 17px 17px 0;
}


.project-icon-box,
.plugin-icon-box,
.integration-icon-box {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    font-size: 16px;
}


.project-icon-box {
    color: #b879ff;

    background: rgba(155, 92, 255, 0.11);

    border: 1px solid rgba(155, 92, 255, 0.18);
}


.project-icon-box.development,
.plugin-icon-box.development {
    color: #65a8ff;

    background: rgba(0, 123, 255, 0.09);

    border-color: rgba(0, 123, 255, 0.17);
}


.plugin-icon-box.ai,
.integration-icon-box.ai {
    color: #c084fc;

    background: rgba(155, 92, 255, 0.11);

    border: 1px solid rgba(155, 92, 255, 0.18);
}


.plugin-icon-box.media {
    color: #f6c453;

    background: rgba(246, 196, 83, 0.08);

    border: 1px solid rgba(246, 196, 83, 0.16);
}


.integration-icon-box.firetip {
    color: #ff6978;

    background: rgba(220, 53, 69, 0.09);

    border: 1px solid rgba(220, 53, 69, 0.18);
}


.integration-icon-box.runtime {
    color: #67d6a3;

    background: rgba(46, 204, 113, 0.08);

    border: 1px solid rgba(46, 204, 113, 0.16);
}


/* ============================================================
   CARD MENU
   ============================================================ */

.workspace-card-menu {
    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;

    border-radius: 8px;

    background: transparent;

    color: #555;

    cursor: pointer;

    transition:
        color 0.16s ease,
        background 0.16s ease;
}


.workspace-card-menu:hover {
    color: #ccc;

    background: rgba(255, 255, 255, 0.06);
}


/* ============================================================
   CARD BODY
   ============================================================ */

.workspace-card-body {
    flex: 1;

    padding: 16px 17px 12px;
}


.workspace-card-body h3 {
    margin: 0 0 7px;

    color: #ededf0;

    font-size: 15px;
    font-weight: 650;

    letter-spacing: -0.15px;
}


.workspace-card-body p {
    margin: 0;

    max-width: 310px;

    color: #666672;

    font-size: 12px;
    line-height: 1.55;
}


/* ============================================================
   CARD FOOTER
   ============================================================ */

.workspace-card-footer {
    min-height: 43px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 17px;

    border-top: 1px solid rgba(255, 255, 255, 0.045);

    color: #555;
}


.workspace-card-footer small {
    color: #4e4e57;

    font-size: 10px;
}


/* ============================================================
   ONLINE STATUS
   ============================================================ */

.workspace-status {
    display: inline-flex;
    align-items: center;

    gap: 6px;

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 0.8px;
}


.workspace-status span {
    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: #45d483;

    box-shadow:
        0 0 8px rgba(69, 212, 131, 0.65);
}


.workspace-status.online {
    color: #63bd8b;
}


/* ============================================================
   PLUGIN STATUS
   ============================================================ */

.plugin-status {
    padding: 5px 8px;

    border-radius: 6px;

    font-size: 8px;
    font-weight: 700;

    letter-spacing: 0.7px;
}


.plugin-status.enabled {
    color: #61c990;

    background: rgba(46, 204, 113, 0.07);

    border: 1px solid rgba(46, 204, 113, 0.13);
}


/* ============================================================
   INTEGRATION STATUS
   ============================================================ */

.integration-connection {
    display: inline-flex;
    align-items: center;

    gap: 6px;

    font-size: 8px;
    font-weight: 700;

    letter-spacing: 0.7px;
}


.integration-connection span {
    width: 6px;
    height: 6px;

    border-radius: 50%;
}


.integration-connection.connected {
    color: #62c991;
}


.integration-connection.connected span {
    background: #45d483;

    box-shadow:
        0 0 8px rgba(69, 212, 131, 0.6);
}


/* ============================================================
   VERSION / ENDPOINT
   ============================================================ */

.plugin-version,
.integration-endpoint {
    color: #50505a;

    font-size: 10px;

    font-family: monospace;
}


.integration-endpoint {
    color: #595963;
}


/* ============================================================
   CARD LINK BUTTON
   ============================================================ */

.workspace-link-btn {
    display: inline-flex;
    align-items: center;

    gap: 7px;

    padding: 5px 0;

    border: 0;

    background: transparent;

    color: #777;

    font-family: inherit;
    font-size: 10px;
    font-weight: 600;

    cursor: pointer;

    transition:
        color 0.16s ease;
}


.workspace-link-btn i {
    font-size: 8px;

    transition:
        transform 0.16s ease;
}


.workspace-link-btn:hover {
    color: #b879ff;
}


.workspace-link-btn:hover i {
    transform: translateX(2px);
}


/* ============================================================
   CREATE / INSTALL / ADD CARD
   ============================================================ */

.workspace-new-card {
    min-height: 190px;

    align-items: center;
    justify-content: center;

    padding: 25px;

    border: 1px dashed rgba(155, 92, 255, 0.17);

    background:
        radial-gradient(
            circle at center,
            rgba(155, 92, 255, 0.035),
            transparent 65%
        );

    color: #777;

    cursor: pointer;

    font-family: inherit;
}


.workspace-new-card:hover {
    border-color: rgba(155, 92, 255, 0.40);

    background:
        radial-gradient(
            circle at center,
            rgba(155, 92, 255, 0.075),
            transparent 65%
        );

    color: #aaa;
}


.workspace-new-icon {
    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 12px;

    border-radius: 13px;

    color: #9b5cff;

    background: rgba(155, 92, 255, 0.08);

    border: 1px solid rgba(155, 92, 255, 0.16);

    font-size: 16px;

    transition:
        transform 0.18s ease,
        background 0.18s ease;
}


.workspace-new-card:hover .workspace-new-icon {
    transform: scale(1.06);

    background: rgba(155, 92, 255, 0.13);
}


.workspace-new-card strong {
    color: #999;

    font-size: 12px;
    font-weight: 600;
}


.workspace-new-card span {
    margin-top: 5px;

    color: #555;

    font-size: 10px;
}


/* ============================================================
   PLUGIN CATEGORY BAR
   ============================================================ */

.plugin-category-bar {
    display: flex;
    align-items: center;

    gap: 5px;

    margin-bottom: 24px;

    padding: 4px;

    width: fit-content;

    border: 1px solid rgba(255, 255, 255, 0.055);

    border-radius: 10px;

    background: rgba(255, 255, 255, 0.018);
}


.plugin-category {
    height: 30px;

    padding: 0 12px;

    border: 0;

    border-radius: 7px;

    background: transparent;

    color: #5f5f68;

    font-family: inherit;

    font-size: 10px;
    font-weight: 600;

    cursor: pointer;

    transition:
        color 0.16s ease,
        background 0.16s ease;
}


.plugin-category:hover {
    color: #aaa;
}


.plugin-category.active {
    color: #ddd;

    background:
        rgba(155, 92, 255, 0.13);

    box-shadow:
        inset 0 0 0 1px rgba(155, 92, 255, 0.10);
}


/* ============================================================
   EMPTY STATE
   ============================================================ */

.workspace-empty {
    min-height: 430px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    text-align: center;
}


.workspace-empty-icon {
    width: 72px;
    height: 72px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 18px;

    border-radius: 20px;

    color: var(--accent-bright);

    background:
        radial-gradient(
            circle,
            rgba(155, 92, 255, 0.13),
            rgba(155, 92, 255, 0.035)
        );

    border: 1px solid rgba(155, 92, 255, 0.20);

    font-size: 27px;

    box-shadow:
        0 0 40px rgba(155, 92, 255, 0.08);
}


.workspace-empty h3 {
    margin: 0 0 8px;

    color: #eee;

    font-size: 17px;
}


.workspace-empty p {
    max-width: 400px;

    margin: 0;

    color: #666;

    font-size: 12px;
    line-height: 1.6;
}


.workspace-coming-soon {
    display: inline-flex;
    align-items: center;

    gap: 7px;

    margin-top: 20px;

    padding: 7px 11px;

    border-radius: 7px;

    color: #62c991;

    background: rgba(46, 204, 113, 0.06);

    border: 1px solid rgba(46, 204, 113, 0.12);

    font-size: 8px;
    font-weight: 700;

    letter-spacing: 0.8px;
}


.workspace-coming-soon i {
    font-size: 9px;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 800px) {

    #faigen-workspace-panel {
        padding: 12px;
    }


    .workspace-panel-inner {
        max-height: calc(100vh - 24px);

        border-radius: 14px;
    }


    .workspace-panel-header {
        min-height: 78px;

        padding: 16px;
    }


    .workspace-panel-content {
        padding: 16px;
    }


    .workspace-toolbar {
        align-items: stretch;

        flex-direction: column;
    }


    .workspace-search {
        max-width: none;
    }


    .workspace-toolbar-actions {
        width: 100%;
    }


    .workspace-toolbar-actions select {
        flex: 1;
    }


    .workspace-toolbar-actions button {
        white-space: nowrap;
    }


    .workspace-card-grid {
        grid-template-columns: 1fr;
    }


    .plugin-category-bar {
        width: 100%;

        overflow-x: auto;

        scrollbar-width: none;
    }


    .plugin-category-bar::-webkit-scrollbar {
        display: none;
    }


    .plugin-category {
        white-space: nowrap;
    }

}


@media (max-width: 500px) {

    #faigen-workspace-panel {
        padding: 0;
    }


    .workspace-panel-inner {
        width: 100%;
        height: 100%;
        max-height: 100vh;

        border-radius: 0;
    }


    .workspace-panel-title p {
        display: none;
    }


    .workspace-panel-title h2 {
        font-size: 18px;
    }


    .workspace-panel-icon {
        width: 42px;
        height: 42px;
    }


    .workspace-toolbar-actions {
        flex-wrap: wrap;
    }


    .workspace-toolbar-actions select {
        min-width: 150px;
    }

}
.faigen-generated-images {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 12px;
}

.faigen-generated-image {
    width: min(100%, 768px);
    border-radius: 18px;
    overflow: hidden;
    background: #0b0b12;
    border: 1px solid rgba(150, 80, 255, 0.35);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    animation: faigenImageAppear .35s ease-out;
}

.faigen-generated-image img {
    display: block;
    width: 100%;
    height: auto;
    cursor: pointer;
    transition: transform .25s ease, opacity .25s ease;
}

.faigen-generated-image img:hover {
    transform: scale(1.015);
}

@keyframes faigenImageAppear {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
	