@charset "UTF-8";

     
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            line-height: 1.6;
            color: #333;
            background-color: #f5f5f5;
        }
        
        #controls {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: var(--navbar-height);
            background-color: var(--dark-color);
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            z-index: 1000;
            display: flex;
            align-items: center;
            padding: 0 20px;
        }
        
        #controls .nav-left {
            display: flex;
            align-items: center;
            gap: 20px;
            flex: 1;
        }
        
        #controls .nav-title {
            color: white;
            font-size: 1.2rem;
            font-weight: 600;
        }
        
        #controls a {
            color: white;
            text-decoration: none;
            font-size: 1.5rem;
            transition: color 0.3s ease;
        }
        
        #controls a:hover {
            color: var(--primary-color);
        }
        
        .selection-counter {
            background: var(--primary-color);
            color: white;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 0.9rem;
            font-weight: bold;
            margin-left: 10px;
        }
        
        .search-box {
            display: flex;
            gap: 10px;
            margin-left: auto;
            align-items: center;
        }
        
        .search-box select {
            height: 38px;
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 14px;
            background-color: white;
            color: #333;
            cursor: pointer;
        }
        
        .search-box input {
            min-width: 250px;
            height: 38px;
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 14px;
        }
        
        .search-box button {
            height: 38px;
            padding: 8px 16px;
            background-color: var(--primary-color);
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .search-box button:hover {
            background-color: var(--primary-hover);
        }
        
        .search-box button:disabled {
            background-color: #95a5a6;
            cursor: not-allowed;
        }
        
        #mainpart {
            margin-top: calc(var(--navbar-height) + 20px);
            padding: 20px;
            margin-right: 340px;
        }
        
        .loading-overlay {
            position: fixed;
            top: var(--navbar-height);
            left: 0;
            right: 340px;
            bottom: 0;
            background: rgba(255, 255, 255, 0.9);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 998;
            flex-direction: column;
            gap: 20px;
        }
        
        .loading-overlay.active {
            display: flex;
        }
        
        .spinner {
            border: 4px solid #f3f3f3;
            border-top: 4px solid var(--primary-color);
            border-radius: 50%;
            width: 50px;
            height: 50px;
            animation: spin 1s linear infinite;
        }
        
        .loading-text {
            color: var(--dark-color);
            font-size: 1.1rem;
            font-weight: 500;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        .element-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 20px;
            margin-top: 20px;
        }
        
        .element-card {
            background: white;
            border-radius: 8px;
            padding: 20px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        
        .element-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }
        
        .element-card.selected-card {
            border: 2px solid var(--secondary-color);
        }
        
        .element-header {
            display: flex;
            justify-content: space-between;
            align-items: start;
            margin-bottom: 15px;
        }
        
        .element-title {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--dark-color);
            flex: 1;
        }
        
        .element-type {
            background: var(--light-gray);
            padding: 4px 12px;
            border-radius: 12px;
            font-size: 0.85rem;
            color: var(--dark-color);
        }
        
        .element-info {
            color: #666;
            font-size: 0.9rem;
            margin-bottom: 15px;
        }
        
        .element-actions {
            display: flex;
            gap: 10px;
        }
        
        .btn {
            padding: 8px 16px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 0.9rem;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }
        
        .btn-view {
            background: var(--primary-color);
            color: white;
            text-decoration: none;
        }
        
        .btn-view:hover {
            background: var(--primary-hover);
        }
        
        .btn-select {
            background: white;
            border: 2px solid var(--primary-color);
            color: var(--primary-color);
        }
        
        .btn-select:hover {
            background: var(--primary-color);
            color: white;
        }
        
        .btn-select.selected {
            background: var(--secondary-color);
            border-color: var(--secondary-color);
            color: white;
        }
        
        .selected-panel {
            position: fixed;
            right: 20px;
            top: 80px;
            width: 300px;
            background: white;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            padding: 20px;
            max-height: calc(100vh - 100px);
            overflow-y: auto;
            z-index: 999;
        }
        
        .selected-panel h3 {
            margin: 0 0 15px 0;
            color: var(--dark-color);
            font-size: 1.1rem;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .selected-items {
            margin-bottom: 15px;
        }
        
        .selected-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px;
            background: #f8f9fa;
            border-radius: 4px;
            margin-bottom: 8px;
        }
        
        .selected-item .item-name {
            flex: 1;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-size: 0.9rem;
        }
        
        .selected-item .item-name a {
            color: var(--primary-color);
            text-decoration: none;
        }
        
        .selected-item .item-name a:hover {
            text-decoration: underline;
        }
        
        .btn-remove {
            background: none;
            border: none;
            color: #e74c3c;
            cursor: pointer;
            padding: 4px 8px;
            font-size: 1rem;
        }
        
        .btn-remove:hover {
            color: #c0392b;
        }
        
        .selected-actions {
            display: flex;
            gap: 8px;
            flex-direction: column;
        }
        
        .selected-actions .btn {
            width: 100%;
            justify-content: center;
        }
        
        .btn-primary {
            background-color: var(--primary-color);
            color: white;
        }
        
        .btn-primary:hover {
            background-color: var(--primary-hover);
        }
        
        .btn-primary:disabled {
            background-color: #95a5a6;
            cursor: not-allowed;
        }
        
        .btn-danger {
            background-color: #e74c3c;
            color: white;
        }
        
        .btn-danger:hover {
            background-color: #c0392b;
        }
        
        .btn-close {
            background-color: #95a5a6;
            color: white;
        }
        
        .btn-close:hover {
            background-color: #7f8c8d;
        }
        
        .btn-cytoscape {
            background-color: #3498db;
            color: white;
        }
        
        .btn-cytoscape:hover {
            background-color: #2980b9;
        }
        
        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: #999;
        }
        
        .empty-state i {
            font-size: 4rem;
            margin-bottom: 20px;
            color: #ddd;
        }
        
        .alert {
            padding: 15px;
            border-radius: 4px;
            margin-bottom: 20px;
        }
        
        .alert-info {
            background-color: #d1ecf1;
            border: 1px solid #bee5eb;
            color: #0c5460;
        }
        
        .alert-warning {
            background-color: #fff3cd;
            border: 1px solid #ffeeba;
            color: #856404;
        }
        
        .alert-error {
            background-color: #f8d7da;
            border: 1px solid #f5c6cb;
            color: #721c24;
        }
        
        .alert-success {
            background-color: #d4edda;
            border: 1px solid #c3e6cb;
            color: #155724;
        }
        
        fieldset {
            border: 1px solid #ddd;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
            background: white;
        }
        
        legend {
            font-size: 1.2rem;
            font-weight: 600;
            color: var(--dark-color);
            padding: 0 10px;
        }
        
        /* Intersection section styles */
        .intersection-section {
            margin-bottom: 30px;
            animation: slideIn 0.5s ease;
        }
        
        @keyframes slideIn {
            from { 
                opacity: 0; 
                transform: translateY(-20px); 
            }
            to { 
                opacity: 1; 
                transform: translateY(0); 
            }
        }
        
        .intersection-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }
        
        .intersection-info {
            display: flex;
            gap: 20px;
            margin-bottom: 15px;
            padding: 15px;
            background-color: #f8f9fa;
            border-radius: 4px;
        }
        
        .intersection-info-item {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .intersection-info-item i {
            color: var(--primary-color);
        }
        
        .diagTree {
            width: 100%;
            border-collapse: collapse;
            background: white;
        }
        
        .diagTree td {
            padding: 12px;
            border: 1px solid #ddd;
            vertical-align: top;
        }
        
        .diagTree tr:hover {
            background-color: #f8f9fa;
        }
        
        .diagTree tr[class^="treegrid-"] td:first-child {
            font-weight: bold;
            background-color: #f8f9fa;
            position: sticky;
            left: 0;
        }
        
        .wrapper {
            overflow-x: auto;
            max-width: 100%;
            border-radius: 4px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        }
        
        /* diagCScape form styles */
        .diagcscape-form-container {
            margin: 15px 0;
            padding: 15px;
            background-color: #e3f2fd;
            border-radius: 4px;
            border: 1px solid #90caf9;
        }
        
        .diagcscape-form-container form {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .diagcscape-form-container .btn-cytoscape {
            margin: 0;
        }
        
        .diagcscape-info {
            font-size: 0.9rem;
            color: #1976d2;
            margin-bottom: 10px;
        }
        
        .diagcscape-info i {
            margin-right: 5px;
            }
