UNPKG

datajunction-ui

Version:
2,640 lines (2,252 loc) 85.8 kB
/* ================================= Materialization Planner - Three Column Layout ================================= */ /* Reset native browser input styling for all planner inputs */ .cube-search, .combobox-search, .filter-input { -webkit-appearance: none; appearance: none; box-shadow: none; } /* CSS Variables for theming */ :root { --planner-bg: #f8fafc; --planner-surface: #ffffff; --planner-surface-hover: #f1f5f9; --planner-border: #e2e8f0; --planner-text: #1e293b; --planner-text-muted: #64748b; --planner-text-dim: #94a3b8; --accent-primary: #3b82f6; --accent-preagg: #d97706; --accent-metric: #a2283e; /* Rose/pink - matches node_type__metric */ --accent-dimension: #a96621; /* Golden orange - matches node_type__dimension */ --accent-derived: #db2777; --accent-cube: #580076; /* Dark purple - matches node_type__cube */ --accent-success: #059669; --accent-warning: #d97706; --accent-error: #dc2626; --font-display: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace; --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; --radius-sm: 4px; --radius-md: 8px; --radius-lg: 12px; --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05); --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1); --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15); } /* Full page layout */ .planner-page { height: calc(100vh - 90px); display: flex; flex-direction: column; background: var(--planner-bg); color: var(--planner-text); font-family: var(--font-body); overflow: hidden; border-top: 1px solid #eee; } /* Header */ .planner-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; background: var(--planner-surface); border-bottom: 1px solid var(--planner-border); flex-shrink: 0; } .planner-header-content h1 { margin: 0; font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -0.3px; color: var(--planner-text); } .planner-header-content p { margin: 4px 0 0; font-size: 13px; color: var(--planner-text-muted); } .header-error { padding: 8px 16px; background: rgba(220, 38, 38, 0.1); border: 1px solid rgba(220, 38, 38, 0.3); border-radius: var(--radius-md); color: var(--accent-error); font-size: 13px; } .planner-error-banner { flex-shrink: 0; border-radius: 0; border-left: none; border-right: none; border-top: none; } /* Materialization Error Banner */ .materialization-error { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 14px; margin-bottom: 12px; background: rgba(220, 38, 38, 0.08); border: 1px solid rgba(220, 38, 38, 0.25); border-radius: var(--radius-md); color: var(--accent-error); font-size: 12px; line-height: 1.5; } .materialization-error .error-content { display: flex; align-items: flex-start; gap: 8px; flex: 1; } .materialization-error .error-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; } .materialization-error .error-message { word-break: break-word; } .materialization-error .error-dismiss { background: none; border: none; color: var(--accent-error); font-size: 18px; line-height: 1; cursor: pointer; padding: 0; opacity: 0.7; transition: opacity 0.15s ease; flex-shrink: 0; } .materialization-error .error-dismiss:hover { opacity: 1; } /* Global error banner (outside form) */ .materialization-error.global-error { margin: 0 0 16px 0; } /* Workflow Success Banner */ .workflow-success { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 14px; margin-bottom: 12px; background: rgba(34, 197, 94, 0.08); border: 1px solid rgba(34, 197, 94, 0.25); border-radius: var(--radius-md); color: var(--accent-green, #22c55e); font-size: 12px; line-height: 1.5; } .workflow-success .success-content { display: flex; align-items: flex-start; gap: 8px; flex: 1; } .workflow-success .success-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; background: var(--accent-green, #22c55e); color: white; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; } .workflow-success .success-message { word-break: break-word; } .workflow-success .success-message strong { display: block; margin-bottom: 6px; color: var(--planner-text); } .workflow-success .workflow-url-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; } .workflow-success .workflow-url-list a { color: var(--accent-green, #22c55e); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; } .workflow-success .workflow-url-list a:hover { text-decoration: underline; } .workflow-success .success-dismiss { background: none; border: none; color: var(--accent-green, #22c55e); font-size: 18px; line-height: 1; cursor: pointer; padding: 0; opacity: 0.7; transition: opacity 0.15s ease; flex-shrink: 0; } .workflow-success .success-dismiss:hover { opacity: 1; } /* Cube Card (matches pre-agg card styling) */ .preagg-summary-card.cube-card { /* border-color: rgba(88, 0, 118, 0.3); */ background: linear-gradient( 135deg, rgba(88, 0, 118, 0.04), var(--planner-bg) ); } .preagg-summary-card.cube-card .preagg-summary-name.cube-name { color: var(--accent-cube, #580076); } .cube-workflow-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--planner-border); } /* Materialization Status Bar (compact) */ .materialization-status-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: linear-gradient( 135deg, rgba(5, 150, 105, 0.06), var(--planner-bg) ); border: 1px solid rgba(5, 150, 105, 0.25); border-radius: var(--radius-md); margin-bottom: 16px; } .status-bar-left { display: flex; align-items: center; gap: 8px; } .status-bar-indicator { color: var(--accent-success, #059669); font-size: 12px; font-weight: bold; } .status-bar-label { font-size: 12px; font-weight: 600; color: var(--accent-success, #059669); } .status-bar-badge { font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 10px; } .status-bar-badge.badge-cube { background: rgba(88, 0, 118, 0.12); color: var(--accent-cube, #580076); } .status-bar-badge.badge-preagg { background: rgba(107, 114, 128, 0.12); color: var(--planner-text); } .status-bar-edit { padding: 4px 10px; font-size: 11px; font-weight: 500; border-radius: var(--radius-sm); cursor: pointer; transition: all 0.15s ease; border: 1px solid var(--planner-border); background: var(--planner-surface); color: var(--planner-text); } .status-bar-edit:hover { background: var(--planner-surface-hover); border-color: var(--accent-primary); } /* Selection Summary Label */ .selection-summary-label { font-size: 11px; font-weight: 600; color: var(--planner-text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.3px; } /* Status Pill Badges */ .status-pill { font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: var(--radius-sm); white-space: nowrap; } .status-pill.status-active { background: rgba(5, 150, 105, 0.1); color: var(--accent-success, #059669); } .status-pill.status-not-set { background: rgba(107, 114, 128, 0.1); color: var(--planner-text-muted); } .status-pill.status-pending { background: rgba(245, 158, 11, 0.1); color: var(--accent-warning, #f59e0b); } /* Pre-Aggregation Section Header */ .preagg-section-header { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--planner-text-muted); padding: 8px 0; margin-bottom: 4px; border-bottom: 1px solid var(--planner-border); } /* ================================= Three Column Layout ================================= */ .planner-layout { display: flex; flex: 1; min-height: 0; overflow: hidden; } /* Left: Selection Panel */ .planner-selection { width: 20%; min-width: 200px; min-height: 0; background: var(--planner-surface); overflow: hidden; display: flex; flex-direction: column; } /* Center: Graph */ .planner-graph { flex: 1; display: flex; flex-direction: column; background: var(--planner-bg); overflow: hidden; } .graph-header { padding: 12px 16px; background: var(--planner-surface); border-bottom: 1px solid var(--planner-border); flex-shrink: 0; } .graph-stats { font-size: 12px; color: var(--planner-text-muted); font-family: var(--font-display); } .graph-loading { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: var(--planner-text-muted); } .loading-spinner { width: 32px; height: 32px; border: 3px solid var(--planner-border); border-top-color: var(--accent-primary); border-radius: 50%; animation: spin 0.8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } .graph-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px; text-align: center; } .graph-empty .empty-icon { font-size: 48px; opacity: 0.3; margin-bottom: 16px; } .graph-empty h3 { margin: 0 0 8px; font-size: 18px; color: var(--planner-text); } .graph-empty p { margin: 0; font-size: 14px; color: var(--planner-text-muted); max-width: 300px; } /* Vertical resizer between graph and details panels */ .vertical-resizer { width: 1px; background: var(--planner-border); cursor: col-resize; flex-shrink: 0; position: relative; z-index: 1; transition: background 0.15s; } /* Wider invisible hit area */ .vertical-resizer::after { content: ''; position: absolute; top: 0; bottom: 0; left: -4px; right: -4px; } .vertical-resizer:hover, .vertical-resizer:active { background: var(--accent-primary); } /* Right: Details Panel */ .planner-details { width: 40%; min-width: 280px; background: var(--planner-surface); overflow-y: auto; } /* ================================= Selection Panel Styles ================================= */ .selection-panel { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; } .resizable-sections { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; } /* Cube Preset Section */ .cube-preset-section { padding: 10px 12px; border-bottom: 1px solid var(--planner-border); background: var(--planner-bg); position: relative; flex-shrink: 0; z-index: 10; /* Create stacking context for dropdown */ } .preset-row { display: flex; align-items: center; gap: 8px; min-width: 0; /* Allow children to shrink */ } .preset-button { display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: var(--planner-elevated); border: 1px solid var(--planner-border); border-radius: var(--radius-md); color: var(--planner-text); font-size: 11px; font-weight: 500; min-width: 0; /* Allow button to shrink for truncation */ flex: 1; font-family: var(--font-display); cursor: pointer; transition: all 0.15s ease; flex: 1; } .preset-button:hover { background: var(--planner-surface); border-color: var(--accent-primary); } /* Loaded cube preset state */ .preset-button.has-preset { background: rgba(88, 0, 118, 0.1); /* Light purple - matches cube color */ border-color: var(--accent-cube); color: var(--accent-cube); } .preset-button.has-preset:hover { background: rgba(88, 0, 118, 0.15); border-color: var(--accent-cube); } .preset-label { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .preset-icon { font-size: 12px; flex-shrink: 0; } .dropdown-arrow { margin-left: auto; font-size: 8px; opacity: 0.6; } .clear-all-btn { padding: 6px 10px; background: transparent; border: 1px solid var(--planner-border); border-radius: var(--radius-md); color: var(--planner-text-muted); font-size: 10px; font-weight: 500; cursor: pointer; transition: all 0.15s ease; white-space: nowrap; flex-shrink: 0; } .clear-all-btn:hover { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.3); color: #dc2626; } .cube-dropdown { position: absolute; top: calc(100% - 1px); left: 0; right: 0; background: #ffffff; border: 1px solid var(--planner-border); border-top: none; border-radius: 0 0 var(--radius-md) var(--radius-md); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); z-index: 1000; /* High z-index to appear above everything */ max-height: 300px; display: flex; flex-direction: column; } .cube-search { padding: 8px 12px; border: none; border-bottom: 1px solid var(--planner-border); background: transparent; color: var(--planner-text); font-size: 12px; outline: none; } .cube-search::placeholder { color: var(--planner-text-muted); } .cube-list { overflow-y: auto; max-height: 250px; } .cube-option { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 8px 12px; padding-right: 32px; background: transparent; border: none; text-align: left; cursor: pointer; transition: background 0.1s ease; position: relative; } .cube-option:hover { background: var(--planner-surface); } .cube-option.selected { background: rgba(88, 0, 118, 0.08); } .cube-option.selected:hover { background: rgba(88, 0, 118, 0.12); } .cube-option.selected .cube-name { color: var(--accent-cube); } .cube-selected-icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--accent-cube); font-size: 12px; font-weight: 600; } .cube-name { font-size: 12px; font-weight: 500; color: var(--planner-text); font-family: var(--font-display); } .cube-info { font-size: 10px; color: var(--planner-text-muted); } .cube-empty { padding: 16px 12px; text-align: center; font-size: 11px; color: var(--planner-text-muted); } .selection-section { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; } .section-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--planner-border); flex-shrink: 0; } .section-header h3 { margin: 0; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--planner-text); } .selection-count { font-size: 11px; color: var(--planner-text-dim); } .search-box { position: relative; padding: 8px 12px; flex-shrink: 0; max-height: 70px; } .search-box input { width: 100%; padding: 8px 12px; padding-right: 32px; background: var(--planner-bg); border: 1px solid var(--planner-border); border-radius: var(--radius-md); font-size: 13px; color: var(--planner-text); outline: none; transition: border-color 0.15s; } .search-box input:focus { border-color: var(--accent-primary); } .search-box input::placeholder { color: var(--planner-text-dim); } .clear-search { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--planner-text-dim); font-size: 16px; cursor: pointer; padding: 4px; line-height: 1; } .clear-search:hover { color: var(--planner-text); } .selection-list { flex: 1; overflow-y: auto; padding: 8px 0; } .namespace-group { margin-bottom: 4px; } .namespace-header { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; user-select: none; transition: background 0.15s; } .namespace-header:hover { background: var(--planner-surface-hover); } .expand-icon { font-size: 10px; color: var(--planner-text-dim); width: 12px; } .namespace-name { flex: 1; font-size: 12px; font-weight: 600; color: var(--planner-text); font-family: var(--font-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .namespace-count { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--planner-text-dim); } .selected-badge { background: var(--accent-primary); color: white; padding: 2px 6px; border-radius: 10px; font-size: 10px; font-weight: 600; } .namespace-items { padding-left: 20px; } .namespace-actions { display: flex; gap: 8px; padding: 4px 12px 8px; } .select-all-btn { background: none; border: none; color: var(--accent-primary); font-size: 11px; cursor: pointer; padding: 4px 8px; border-radius: var(--radius-sm); transition: background 0.15s; } .select-all-btn:hover { background: rgba(59, 130, 246, 0.1); text-decoration: underline; } .selection-item { display: flex; align-items: flex-start; gap: 8px; padding: 6px 12px; cursor: pointer; transition: background 0.15s; } .selection-item:hover { background: var(--planner-surface-hover); } .selection-item input[type='checkbox'] { margin-top: 2px; accent-color: var(--accent-primary); } /* Incompatible metric (dims selected, this metric doesn't support them) */ .selection-item.metric-incompatible { opacity: 0.35; } /* Compatible badge shown next to metrics that match selected dims */ .metric-compatible-badge { margin-left: auto; font-size: 11px; color: var(--accent-success); font-weight: 600; flex-shrink: 0; } .item-name { font-size: 13px; color: var(--planner-text); word-break: break-word; } .dimension-item { align-items: flex-start; } .dimension-info { display: flex; flex-direction: column; gap: 2px; } .dimension-full-name { font-size: 10px; color: var(--planner-text-muted); font-family: var(--font-display); word-break: break-all; } .dimension-path { font-size: 10px; color: var(--planner-text-dim); font-family: var(--font-display); } /* Dimension group (node-level header + items) */ .dim-group { margin-bottom: 4px; } .dim-group-header { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; user-select: none; transition: background 0.15s; } .dim-group-header:hover { background: var(--planner-surface-hover); } .dim-group-name { flex: 1; font-size: 12px; font-weight: 600; color: var(--planner-text); font-family: var(--font-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dim-group-meta { font-size: 10px; font-weight: 400; color: var(--planner-text-muted); background: var(--planner-bg-subtle, rgba(0, 0, 0, 0.06)); padding: 1px 5px; border-radius: 8px; white-space: nowrap; flex-shrink: 0; } .dim-group-count { font-size: 11px; color: var(--planner-text-dim); flex-shrink: 0; } .dim-group-item { padding-left: 28px; } /* Role path sub-group (second level) */ .dim-role-group { padding-left: 20px; } .dim-role-header { display: flex; align-items: center; gap: 8px; padding: 5px 12px; cursor: pointer; user-select: none; transition: background 0.15s; } .dim-role-header:hover { background: var(--planner-surface-hover); } .dim-role-label { flex: 1; font-size: 11px; color: var(--planner-text-muted); font-family: var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .dim-role-item { padding-left: 22px; } .dim-filter-btn { opacity: 0; pointer-events: none; margin-left: auto; align-self: center; flex-shrink: 0; background: none; border: none; color: var(--planner-text-dim); font-size: 10px; font-family: var(--font-display); padding: 0 2px; cursor: pointer; transition: opacity 0.1s, color 0.1s; } .dim-role-item:hover .dim-filter-btn { opacity: 1; pointer-events: auto; } .dim-filter-btn:hover { color: var(--accent-dimension); } /* Search result items (flat list) */ .search-result-item { padding: 8px 12px; } .search-result-info { display: flex; flex-direction: column; gap: 2px; } .item-namespace { font-size: 10px; color: var(--planner-text-dim); font-family: var(--font-display); } .section-divider { height: 1px; background: var(--planner-border); margin: 0; flex-shrink: 0; } .section-divider.draggable-divider { height: 5px; cursor: row-resize; background: var(--planner-border); transition: background 0.15s; position: relative; } .section-divider.draggable-divider:hover, .section-divider.draggable-divider:active { background: var(--accent-primary); } .empty-list { padding: 24px 16px; text-align: center; font-size: 13px; color: var(--planner-text-dim); } .empty-list.hint { font-style: italic; } /* ================================= Flow Graph Styles ================================= */ .compact-flow-container { flex: 1; position: relative; background: var(--planner-bg); } .compact-flow-container .react-flow__background { background: var(--planner-bg) !important; } .graph-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--planner-text-dim); } .graph-empty-state .empty-icon { font-size: 48px; opacity: 0.3; margin-bottom: 16px; } /* Compact Nodes */ .compact-node { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--planner-surface); border: 2px solid var(--planner-border); border-radius: var(--radius-md); cursor: pointer; transition: all 0.15s ease; min-width: 160px; box-shadow: var(--shadow-sm); } .compact-node:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); } .compact-node.selected { border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); } .compact-node-icon { font-size: 16px; opacity: 0.7; } .compact-node-content { flex: 1; min-width: 0; } .compact-node-name { font-size: 12px; font-weight: 600; color: var(--planner-text); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .compact-node-meta { display: flex; gap: 8px; font-size: 10px; color: var(--planner-text-dim); } .compact-node-badge { font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px; padding: 2px 6px; border-radius: 3px; background: rgba(219, 39, 119, 0.15); color: var(--accent-derived); font-weight: 600; } /* Pre-agg Node */ .compact-node-preagg { border-color: rgba(217, 119, 6, 0.4); } .compact-node-preagg:hover { border-color: var(--accent-preagg); } .compact-node-preagg .compact-node-icon { color: var(--accent-preagg); } .compact-node-preagg.selected { border-color: var(--accent-preagg); box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.2); } /* Metric Node */ .compact-node-metric { border-color: rgba(162, 40, 62, 0.4); /* Matches --accent-metric */ } .compact-node-metric:hover { border-color: var(--accent-metric); } .compact-node-metric .compact-node-icon { color: var(--accent-metric); } .compact-node-metric.selected { border-color: var(--accent-metric); box-shadow: 0 0 0 3px rgba(162, 40, 62, 0.2); /* Matches --accent-metric */ } /* Derived Metric */ .compact-node-derived { border-color: rgba(219, 39, 119, 0.4); } .compact-node-derived:hover { border-color: var(--accent-derived); } .compact-node-derived .compact-node-icon { color: var(--accent-derived); } /* Component Node */ .compact-node-component { border-color: rgba(34, 197, 94, 0.4); } .compact-node-component:hover { border-color: #22c55e; } .compact-node-component .compact-node-icon { color: #22c55e; } .compact-node-component.selected { border-color: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); } /* Node Handles */ .compact-node .react-flow__handle { width: 8px; height: 8px; border: 2px solid var(--planner-surface); background: var(--planner-text-dim); } .compact-node-preagg .react-flow__handle { background: var(--accent-preagg); } .compact-node-component .react-flow__handle { background: #22c55e; } .compact-node-metric .react-flow__handle { background: var(--accent-metric); } /* Graph Legend */ .graph-legend { position: absolute; bottom: 16px; right: 16px; display: flex; gap: 16px; padding: 10px 16px; background: rgba(255, 255, 255, 0.95); border: 1px solid var(--planner-border); border-radius: var(--radius-md); font-size: 11px; color: var(--planner-text-muted); backdrop-filter: blur(8px); z-index: 10; } .legend-item { display: flex; align-items: center; gap: 6px; } .legend-dot { width: 10px; height: 10px; border-radius: 50%; } .legend-dot.preagg { background: var(--accent-preagg); } .legend-dot.component { background: #22c55e; } .legend-dot.metric { background: var(--accent-metric); } .legend-dot.derived { background: var(--accent-derived); } /* ================================= Details Panel Styles ================================= */ .details-panel { height: 100%; overflow-y: auto; } .details-panel-empty { display: flex; align-items: center; justify-content: center; height: 100%; } .empty-hint { text-align: center; padding: 48px 24px; } .empty-hint .empty-icon { font-size: 40px; opacity: 0.2; margin-bottom: 16px; } .empty-hint h4 { margin: 0 0 8px; font-size: 14px; color: var(--planner-text); } .empty-hint p { margin: 0; font-size: 12px; color: var(--planner-text-dim); } /* Details Header */ .details-header { padding: 16px; background: var(--planner-bg); border-bottom: 1px solid var(--planner-border); } .details-type-badge { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 4px 8px; border-radius: var(--radius-sm); } .details-type-badge.preagg { background: rgba(217, 119, 6, 0.15); color: var(--accent-preagg); } .details-type-badge.metric { background: rgba(162, 40, 62, 0.15); /* Matches --accent-metric */ color: var(--accent-metric); } .details-type-badge.derived { background: rgba(219, 39, 119, 0.15); color: var(--accent-derived); } .details-type-badge.overview { background: rgba(59, 130, 246, 0.15); color: var(--accent-primary); } .details-close { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--planner-border); border-radius: var(--radius-sm); color: var(--planner-text-muted); font-size: 16px; cursor: pointer; transition: all 0.15s; } .details-close:hover { background: var(--planner-surface-hover); color: var(--planner-text); } .details-title { margin: 0; font-size: 16px; font-weight: 700; color: var(--planner-text); font-family: var(--font-display); } .details-full-name { margin: 0; font-size: 11px; color: var(--planner-text-dim); font-family: var(--font-display); word-break: break-all; } /* Info row below title - shows metrics count, materialization status, dialect, freshness */ .details-info-row { margin: 4px 0 0; font-size: 11px; color: var(--planner-text-dim); font-family: var(--font-display); } .info-materialized { color: #7c3aed; font-weight: 500; } .info-base-tables { color: #d97706; font-weight: 500; } /* SQL pane info row */ .sql-pane-info { font-size: 11px; color: var(--planner-text-dim); flex: 1; } .sql-pane-info .info-materialized { color: #7c3aed; font-weight: 500; } /* SQL info inline (next to Optimized/Raw toggle) */ .sql-info-inline { font-size: 11px; color: var(--planner-text-dim); margin-left: auto; margin-right: 1em; } /* Details Sections */ .details-section { padding: 14px 16px; border-bottom: 1px solid var(--planner-border); } .details-section-full { padding: 14px 0; } .details-section-full > .section-title, .details-section-full > .section-header-row { padding: 0 16px; } .details-section .section-title { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--planner-text-muted); } .section-icon { font-size: 12px; opacity: 0.6; } .section-icon.cube-icon { color: var(--accent-cube, #580076); opacity: 1; } .section-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; } /* Aggregability Badge */ .details-aggregability-section { text-align: center; } .aggregability-badge { display: inline-block; padding: 6px 12px; border-radius: var(--radius-md); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; } .aggregability-full { background: rgba(5, 150, 105, 0.1); color: var(--accent-success); border: 1px solid rgba(5, 150, 105, 0.2); } .aggregability-limited { background: rgba(217, 119, 6, 0.1); color: var(--accent-warning); border: 1px solid rgba(217, 119, 6, 0.2); } .aggregability-none { background: rgba(220, 38, 38, 0.1); color: var(--accent-error); border: 1px solid rgba(220, 38, 38, 0.2); } /* Grain Pills */ .grain-pills { display: flex; flex-wrap: wrap; gap: 6px; } .grain-pill { display: inline-block; padding: 5px 8px; background: var(--planner-bg); border: 1px solid var(--planner-border); border-radius: var(--radius-sm); font-size: 11px; font-family: var(--font-display); color: var(--planner-text); } .details-section .empty-text { font-size: 12px; color: var(--planner-text-dim); font-style: italic; } /* Metrics List */ .metrics-list { display: flex; flex-direction: column; gap: 6px; } .related-metric { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--planner-bg); border-radius: var(--radius-sm); border: 1px solid var(--planner-border); } .related-metric .metric-name { font-size: 12px; font-weight: 500; color: var(--accent-metric); } .related-metric .derived-badge { font-size: 9px; text-transform: uppercase; padding: 2px 6px; border-radius: 3px; background: rgba(219, 39, 119, 0.15); color: var(--accent-derived); font-weight: 600; } /* Components Table */ .components-table-wrapper { overflow-x: auto; } .details-table { width: 100%; border-collapse: collapse; font-size: 11px; } .details-table th { padding: 8px 12px; background: var(--planner-bg); color: var(--planner-text-muted); font-weight: 600; font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px; text-align: left; border-bottom: 1px solid var(--planner-border); } .details-table td { padding: 10px 12px; border-bottom: 1px solid var(--planner-border); vertical-align: top; } .details-table tr:hover td { background: rgba(59, 130, 246, 0.03); } /* Highlighted component row - when clicking a component in the graph */ .details-table tr.component-row-highlighted { animation: highlightFade 2s ease-out; } .details-table tr.component-row-highlighted td { background: rgb(240 246 59 / 15%); border-top: 1px solid rgba(59, 130, 246, 0.3); border-bottom: 1px solid rgba(59, 130, 246, 0.3); } @keyframes highlightFade { 0% { background: rgba(59, 130, 246, 0.3); } 100% { background: rgba(59, 130, 246, 0.15); } } .comp-name-cell code { font-family: var(--font-display); font-size: 10px; color: var(--accent-preagg); background: rgba(217, 119, 6, 0.1); padding: 2px 5px; border-radius: 3px; } .comp-expr-cell code { font-family: var(--font-display); font-size: 10px; color: var(--planner-text-muted); word-break: break-all; } .agg-func, .merge-func { font-family: var(--font-display); font-size: 10px; color: var(--planner-text-dim); } /* SQL Section */ .details-sql-section { border-bottom: none; } /* SQL View Toggle */ .sql-view-toggle { display: flex; gap: 2px; background: #e2e8f0; border-radius: var(--radius-sm); padding: 2px; } .sql-toggle-btn { padding: 4px 10px; background: transparent; color: #64748b; border: none; border-radius: calc(var(--radius-sm) - 2px); font-size: 10px; font-weight: 600; cursor: pointer; transition: all 0.15s; } .sql-toggle-btn:hover:not(.active):not(:disabled) { color: #334155; background: rgba(255, 255, 255, 0.5); } .sql-toggle-btn.active { background: white; color: var(--accent-primary); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); } .sql-toggle-btn:disabled { cursor: wait; opacity: 0.7; } /* Copy SQL button (for PreAggDetailsPanel) */ .copy-sql-btn { padding: 5px 10px; background: var(--accent-primary); color: white; border: none; border-radius: var(--radius-sm); font-size: 10px; font-weight: 600; cursor: pointer; transition: all 0.15s; } .copy-sql-btn:hover { background: #2563eb; } /* Scan Estimate Banner */ .scan-estimate-banner { display: flex; align-items: flex-start; gap: 10px; margin: 0 16px 12px; padding: 12px; border-radius: var(--radius-sm); font-size: 12px; line-height: 1.4; } .scan-estimate-icon { font-size: 16px; flex-shrink: 0; margin-top: 2px; } .scan-estimate-content { flex: 1; } .scan-estimate-header { margin-bottom: 8px; } .scan-estimate-header strong { font-weight: 600; } .scan-estimate-sources { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(0, 0, 0, 0.1); } .scan-source-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 11px; font-family: var(--font-display); } .scan-source-name { flex: 1; color: var(--planner-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .scan-source-size { flex-shrink: 0; font-weight: 600; opacity: 0.9; } /* Scan estimate warning levels */ .scan-estimate-ok { background: rgba(5, 150, 105, 0.08); border: 1px solid rgba(5, 150, 105, 0.2); color: var(--accent-success); } .scan-estimate-warning { background: rgba(217, 119, 6, 0.08); border: 1px solid rgba(217, 119, 6, 0.25); color: var(--accent-warning); } .scan-estimate-critical { background: rgba(220, 38, 38, 0.08); border: 1px solid rgba(220, 38, 38, 0.25); color: var(--accent-error); } .sql-code-wrapper { padding: 0 16px 16px; } .sql-code-wrapper pre { margin: 0 !important; } /* Formula Display (for metric details) */ .formula-display { padding: 10px; background: var(--planner-bg); border: 1px solid var(--planner-border); border-radius: var(--radius-sm); } .formula-display code { font-family: var(--font-display); font-size: 11px; color: var(--accent-primary); word-break: break-all; } /* Component Tags */ .component-tags { display: flex; flex-wrap: wrap; gap: 6px; } .component-tag { padding: 5px 8px; background: rgba(217, 119, 6, 0.1); color: var(--accent-preagg); border-radius: var(--radius-sm); font-size: 10px; font-family: var(--font-display); } /* Pre-agg Sources */ .preagg-sources { display: flex; flex-direction: column; gap: 6px; } .preagg-source-item { padding: 8px 10px; background: var(--planner-bg); border: 1px solid var(--planner-border); border-radius: var(--radius-sm); } .preagg-source-name { display: block; font-size: 12px; font-weight: 500; color: var(--accent-preagg); margin-bottom: 2px; } .preagg-source-full { font-size: 10px; color: var(--planner-text-dim); font-family: var(--font-display); } /* ================================= Query Overview Panel Styles ================================= */ .preagg-summary-list { display: flex; flex-direction: column; gap: 10px; } .preagg-summary-card { padding: 12px; background: var(--planner-bg); border: 1px solid var(--planner-border); border-radius: var(--radius-md); } .preagg-summary-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; } .preagg-summary-name { font-size: 13px; font-weight: 600; color: var(--accent-preagg); font-family: var(--font-display); } .aggregability-pill { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; padding: 3px 6px; border-radius: var(--radius-sm); } .aggregability-pill.aggregability-full { background: rgba(5, 150, 105, 0.1); color: var(--accent-success); } .aggregability-pill.aggregability-limited { background: rgba(217, 119, 6, 0.1); color: var(--accent-warning); } .aggregability-pill.aggregability-none { background: rgba(220, 38, 38, 0.1); color: var(--accent-error); } .preagg-summary-details { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; } .preagg-summary-row { display: flex; gap: 8px; font-size: 11px; } .preagg-summary-row .label { color: var(--planner-text-dim); min-width: 60px; } .preagg-summary-row .value { color: var(--planner-text); font-family: var(--font-display); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* Scan estimate styling */ .preagg-summary-row .value.scan-estimate { display: flex; align-items: center; gap: 4px; font-weight: 500; } .scan-estimate-icon { font-size: 12px; display: inline-block; min-width: 14px; text-align: center; } .scan-estimate-hint { font-size: 10px; color: var(--planner-text-dim); font-style: italic; font-weight: 400; } .scan-estimate-low { color: #059669; } .scan-estimate-medium { color: #d97706; } .scan-estimate-high { color: #dc2626; } .scan-estimate-critical { color: #991b1b; } .scan-estimate-unavailable { color: var(--planner-text-dim); font-style: italic; } .preagg-summary-status { display: flex; align-items: center; gap: 6px; padding-top: 8px; border-top: 1px solid var(--planner-border); font-size: 11px; color: var(--planner-text-muted); } .status-indicator { font-size: 12px; } /* Pre-agg/Cube action buttons row */ .preagg-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--planner-border); } .status-indicator.status-materialized { color: var(--accent-success); } .status-indicator.status-not-materialized { color: var(--planner-text-dim); } .status-indicator.status-stale { color: var(--accent-warning); } /* Metrics & Dimensions Summary Grid */ .selection-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } .selection-summary-column .section-title { margin-bottom: 8px; } .selection-summary-list { display: flex; flex-direction: column; gap: 4px; max-height: 150px; overflow-y: auto; } .selection-summary-item { display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: var(--planner-bg); border: 1px solid var(--planner-border); border-radius: var(--radius-sm); text-decoration: none; transition: all 0.15s ease; } .selection-summary-item.clickable:hover { background: var(--planner-surface-hover); border-color: var(--accent-primary); text-decoration: none; } .selection-summary-item.clickable.metric:hover { border-color: var(--accent-metric); } .selection-summary-item.clickable.dimension:hover { border-color: var(--accent-dimension); } .selection-summary-item.metric { border-left: 3px solid var(--accent-metric); } .selection-summary-item.dimension { border-left: 3px solid var(--accent-dimension); } .selection-summary-name { font-size: 11px; font-weight: 500; color: var(--planner-text); font-family: var(--font-display); } .selection-summary-item.metric .selection-summary-name { color: var(--accent-metric); } .selection-summary-item.dimension .selection-summary-name { color: var(--accent-dimension); } /* ================================= React Flow Overrides ================================= */ .react-flow__controls { background: var(--planner-surface) !important; border: 1px solid var(--planner-border) !important; border-radius: var(--radius-md) !important; box-shadow: var(--shadow-md) !important; } .react-flow__controls-button { background: transparent !important; border-bottom-color: var(--planner-border) !important; color: var(--planner-text-muted) !important; } .react-flow__controls-button:hover { background: var(--planner-surface-hover) !important; color: var(--planner-text) !important; } .react-flow__minimap { background: var(--planner-surface) !important; border: 1px solid var(--planner-border) !important; border-radius: var(--radius-md) !important; } /* Scrollbar styling */ .selection-list::-webkit-scrollbar, .details-panel::-webkit-scrollbar, .planner-details::-webkit-scrollbar { width: 6px; } .selection-list::-webkit-scrollbar-track, .details-panel::-webkit-scrollbar-track, .planner-details::-webkit-scrollbar-track { background: transparent; } .selection-list::-webkit-scrollbar-thumb, .details-panel::-webkit-scrollbar-thumb, .planner-details::-webkit-scrollbar-thumb { background: var(--planner-border); border-radius: 3px; } .selection-list::-webkit-scrollbar-thumb:hover, .details-panel::-webkit-scrollbar-thumb:hover, .planner-details::-webkit-scrollbar-thumb:hover { background: var(--planner-text-dim); } /* ================================= Materialization Status Section ================================= */ /* Status Header - Compact row with status + expand toggle */ .materialization-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; margin-top: 8px; background: var(--planner-bg); border: 1px solid var(--planner-border); border-radius: var(--radius-sm); transition: all 0.15s ease; } .materialization-header.clickable { cursor: pointer; } .materialization-header.clickable:hover { background: var(--planner-surface-hover); border-color: var(--accent-primary); } .materialization-status { display: flex; align-items: center; gap: 6px; font-size: 11px; } .status-indicator { font-size: 10px; line-height: 1; } .status-text { font-weight: 500; color: var(--planner-text); } .status-separator { color: var(--planner-text-dim); margin: 0 2px; } .schedule-summary { color: var(--planner-text-muted); font-size: 10px; } /* Status Colors */ .status-not-planned { color: var(--planner-text-dim); } .status-materialized { color: var(--accent-success); } .status-compatible { color: var(--accent-warning); } .status-compatible-materialized { color: var(--accent-success); } /* Compatible pre-agg note */ .compatible-preagg-note { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; margin-bottom: 12px; background: rgba(59, 130, 246, 0.08); border: 1px solid rgba(59, 130, 246, 0.2); border-radius: var(--radius-sm); font-size: 11px; line-height: 1.5; color: var(--planner-text-muted); } .compatible-preagg-note .note-icon { flex-shrink: 0; } .compatible-preagg-note strong { color: var(--planner-text); font-weight: 600; } .status-pending { color: var(--accent-warning); } .status-running { color: var(--accent-primary); } .status-failed { color: var(--accent-error); } /* Expand Toggle Button */ .expand-toggle { background: transparent; border: none; padding: 2px 6px; font-size: 10px; color: var(--planner-text-muted); cursor: pointer; border-radius: var(--radius-sm); transition: all 0.15s ease; } .expand-toggle:hover { background: var(--planner-border); color: var(--planner-text); } /* Expandable Materialization Details */ .materialization-details { margin-top: 8px; padding: 10px 12px; background: var(--planner-surface); border: 1px solid var(--planner-border); border-radius: var(--radius-sm); animation: slideDown 0.15s ease-out; } @keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } } /* Config Rows */ .materialization-config { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; } .config-row { display: flex; align-items: center; gap: 8px; font-size: 11px; } .config-label { color: var(--planner-text-muted); min-width: 70px; } .config-value { color: var(--planner-text); font-weight: 500; } .config-value.config-mono { font-family: var(--font-display); font-size: 10px; background: var(--planner-bg); padding: 2px 6px; border-radius: var(--radius-sm); } .run-status { font-size: 10px; } .run-status.success { color: var(--accent-success); } .run-status.failed { color: var(--accent-error); } /* Workflow Links */ .workflow-links { display: flex; flex-direction: row; gap: 4px; } .workflow-link { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-primary); font-size: 11px; font-weight: 500; text-decoration: none; transition: color 0.15s ease; } .workflow-link:hover { color: var(--accent-primary); text-decoration: underline; } .workflow-link .link-icon { font-size: 10px; opacity: 0.7; } /* Action Buttons */ .materialization-actions { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid var(--planner-border); } .action-btn { padding: 6px 12px; font-size: 11px; font-weight: 500; border-radius: var(--radius-sm); cursor: pointer; transition: all 0.15s ease; border: 1px solid var(--planner-border); background: var(--planner-surface); color: var(--planner-text); } .action-btn:hover { background: var(--planner-surface-hover); } .action-btn-primary { background: var(--accent-primary); border-color: var(--accent-primary); color: white; } .action-btn-primary:hover { background: #2563eb; border-color: #2563eb; } .action-btn-primary:disabled { background: #93c5fd; border-color: #93c5fd; cursor: not-allowed; opacity: 0.8; } .action-btn-secondary { background: transparent; border-color: var(--planner-border); color: var(--planner-text-muted); } .action-btn-danger { background: transparent; border-color: #ef4444; color: #ef4444; } .action-btn-danger:hover { background: rgba(239, 68, 68, 0.1); border-color: #dc2626; color: #dc2626; } .action-btn-danger:disabled { opacity: 0.5; cursor: not-allowed; } .action-btn-secondary:hover { background: var(--planner-surface-hover); color: var(--planner-text); } .action-btn-small { padding: 4px 10px; font-size: 10px; } /* ================================= Plan Materialization CTA ================================= */ .plan-materialization-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; margin: 12px 0; background: linear-gradient( 135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.08) 100% ); border: 1px solid rgba(59, 130, 246, 0.2); border-radius: var(--radius-md); transition: all 0.2s ease; } .plan-materialization-cta:hover { border-color: rgba(59, 130, 246, 0.4); background: linear-gradient( 135deg, rgba(59, 130, 246, 0.12) 0%, rgba(139, 92, 246, 0.12) 100% ); } .cta-content { display: flex; align-items: center; gap: 12px; } .cta-icon { font-size: 24px; filter: grayscale(0%); } .cta-text { display: flex; flex-direction: column; gap: 2px; } .cta-text strong { font-size: 13px; font-weight: 600; color: var(--planner-text); } .cta-text span { font-size: 12px; color: var(--planner-text-muted); } .plan-materialization-cta .action-btn-primary { flex-shrink: 0; padding: 8px 16px; font-size: 12px; font-weight: 600; } /* ================================= Materialization Config Form ================================= */ .materialization-config-form { margin-top: 8px; background: var(--planner-surface); border: 1px solid var(--accent-primary); border-radius: var(--radius-sm); overflow: hidden; animation: slideDown 0.15s ease-out; } .config-form-header { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: rgba(59, 130, 246, 0.1); border-bottom: 1px solid var(--planner-border); font-size: 11px; font-weight: 600; color: var(--accent-primary); } .config-close-btn { background: transparent; border: none; font-size: 16px; color: var(--planner-text-muted); cursor: pointer; padding: 0; line-height: 1; } .config-form-note { padding: 8px 12px; background: rgba(217, 119, 6, 0.1); border-bottom: 1px solid rgba(217, 119, 6, 0.2); font-size: 10px; color: var(--accent-warning); line-height: 1.4; } .config-close-btn:hover { color: var(--planner-text); } .config-form-body { padding: 12px; display: flex; flex-direction: column; gap: 12px; } .config-form-row { display: flex; flex-direction: column; gap: 6px; } .config-form-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--planner-text-muted); } .config-form-options { display: flex; gap: 12px; } .radio-option { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--planner-text); cursor: pointer; } .radio-option input[type='radio'] { margin: 0; accent-color: var(--accent-primary); } .radio-option.disabled { opacity: 0.5; cursor: not-allowed; } .radio-option.disabled input[type='radio'] { cursor: not-allowed; } .option-hint { font-size: 10px; color: var(--planner-text-dim); font-style: italic; margin-left: 4px; } .partition-badge { display: inline-block; font-size: 10px; font-weight: 500; color: #065f46; background: #f5fffa; border: 1px solid #a7f3d0; padding: 2px 6px; border-radius: 4px; m