:root {
    color-scheme: dark;
    /* Brand & base (dark) theme tokens – primary + system colours only */
    --bg: #161717;              /* Black */
    --canvas: #1D1E1F;          /* Dark Charcoal */
    --panel: #242526;           /* Medium Charcoal */
    --border: #303233;          /* Light Charcoal */
    --border-rgb: 48, 50, 51;
    --text: #EDEDED;            /* Off white */
    --text-muted: #808080;      /* Dark Grey */
    --muted: #808080;           /* Dark Grey */
    /* Brand accent */
    --accent: #FEA0F6;          /* Pink – primary/brand */
    --accent-rgb: 254, 160, 246;
    --accent-hover: #FEA0F6;
    /* System colours */
    --success: #19C189;         /* System Green – Success */
    --success-rgb: 25, 193, 137;
    --error: #F43C54;           /* System Red – Error */
    --error-hover: #F43C54;
    --error-rgb: 244, 60, 84;
    /* Primary palette colours repurposed (not secondary set) */
    --warning: #EBF865;         /* Yellow – Creative Nodes */
    --warning-rgb: 235, 248, 101;
    --neutral: #242526;         /* Medium Charcoal */
    --neutral-hover: #303233;   /* Light Charcoal */
    --control-bg: #1D1E1F;      /* Dark Charcoal */
    --control-bg-hover: #303233;/* Light Charcoal */
    --port: #65889D;            /* Nimbus – Measurement Nodes */
}
[data-theme="light"] {
    color-scheme: light;
    /* Light mode from same brand tokens */
    --bg: #EDEDED;              /* Off white */
    --canvas: #EDEDED;
    --panel: #EDEDED;
    --border: #303233;          /* Light Charcoal */
    --border-rgb: 48, 50, 51;
    --text: #161717;            /* Black */
    --text-muted: #808080;      /* Dark Grey */
    --muted: #808080;
    --accent: #FEA0F6;          /* Brand Pink */
    --accent-rgb: 254, 160, 246;
    --accent-hover: #FEA0F6;
    --success: #19C189;         /* System Green */
    --success-rgb: 25, 193, 137;
    --error: #F43C54;           /* System Red */
    --error-hover: #F43C54;
    --error-rgb: 244, 60, 84;
    --warning: #EBF865;         /* Yellow */
    --warning-rgb: 235, 248, 101;
    --neutral: #242526;         /* Medium Charcoal */
    --neutral-hover: #303233;   /* Light Charcoal */
    --control-bg: #EDEDED;      /* Off white */
    --control-bg-hover: #EDEDED;
    --port: #65889D;            /* Nimbus */
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Global layout */
body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont,
                 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell',
                 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    overflow: hidden;
    height: 100vh;
}

#root {
    width: 100%;
    height: 100%;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header */
.header {
    background-color: var(--panel);
    padding: 12px 20px;
    display: grid;
    grid-template-columns: minmax(200px, auto) 1fr auto;
    align-items: center;
    gap: 12px 20px;
    border-bottom: 1px solid var(--border);
    z-index: 10;
    min-height: 60px;
}

.header-title-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.header-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.header-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.app-title {
    font-size: 20px;
    font-weight: 600;
    margin-right: 8px;
}

.app-status {
    color: var(--text-muted);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-text-button {
    background: transparent;
    border: none;
    color: #FEA0F6;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 6px;
    min-height: 36px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.header-text-button:hover,
.header-text-button:focus-visible {
    color: var(--accent-hover);
}

.header-hint {
    color: #FEA0F6;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 960px) {
    .header {
        grid-template-columns: 1fr;
    }
    .header-nav,
    .header-right,
    .header-profile,
    .header-cta {
        justify-content: flex-start;
    }
}

/* Generic buttons */
.btn {
    padding: 8px 16px;
    background: var(--accent);
    border: none;
    border-radius: 6px;
    color: var(--bg);
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    white-space: nowrap;
}

.btn:hover {
    background: var(--accent-hover);
}

.btn.btn-stop {
    background: var(--error);
}

.btn.btn-stop:hover {
    background: var(--error-hover);
}

.btn.btn-settings {
    background: var(--neutral);
}

.btn.btn-settings:hover {
    background: var(--neutral-hover);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Brand panel */
.brand-ingest__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.brand-ingest__tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.brand-ingest__tab {
    border: 1px solid var(--border);
    background: var(--control-bg);
    color: var(--text);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
}

.brand-ingest__tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}

.brand-ingest__models {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-model-options {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.brand-model-pill {
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
}

.brand-model-pill.active {
    background: rgba(var(--accent-rgb), 0.15);
    border-color: var(--accent);
    color: var(--accent);
}

.brand-model-pill:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.brand-ingest__panel {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.brand-ingest__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.brand-ingest__textarea {
    min-height: 140px;
}

.brand-ingest__hint {
    font-size: 12px;
    color: var(--text-muted);
}

.brand-ingest__inline-error {
    margin-top: 4px;
}

.brand-url-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.brand-palette__tabs {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.brand-palette__tab {
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 13px;
    cursor: pointer;
}

.brand-palette__tab.active {
    background: rgba(var(--accent-rgb), 0.15);
    border-color: var(--accent);
    color: var(--accent);
}

.brand-palette__swatches {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.brand-color-swatch {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    background: var(--panel);
}

.brand-color-swatch__chip {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    border: 1px solid rgba(var(--border-rgb), 0.5);
}

.brand-color-swatch__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-color-swatch__label {
    font-size: 13px;
    font-weight: 600;
}

.brand-color-swatch__value {
    font-size: 12px;
    letter-spacing: 0.08em;
}

.brand-color-swatch__usage {
    font-size: 12px;
    color: var(--text-muted);
}

.brand-empty-state {
    font-size: 13px;
    color: var(--text-muted);
    padding: 6px 0;
}

.brand-font-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(var(--border-rgb), 0.4);
}

.brand-font-label {
    width: 120px;
    font-size: 13px;
    color: var(--text-muted);
}

.brand-font-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-font-family {
    font-size: 14px;
    font-weight: 600;
}

.brand-font-usage {
    font-size: 12px;
    color: var(--text-muted);
}

.brand-font-supporting {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.brand-font-tag {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 12px;
    display: inline-flex;
    gap: 6px;
    font-size: 12px;
    align-items: center;
}

.brand-font-tag__family {
    font-weight: 600;
}

.brand-font-tag__usage {
    color: var(--text-muted);
}

.btn-icon {
    font-size: 16px;
}

.btn-sm {
    padding: 6px 10px;
    font-size: 12px;
}

/* Standalone action buttons */
.action-button {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-button.save {
    background-color: var(--accent);
    color: var(--bg);
}

.action-button.clear {
    background-color: var(--error);
    color: var(--bg);
}

.action-button.execute {
    background-color: var(--success);
    color: var(--bg);
}

.action-button.batch {
    background-color: var(--accent);
    color: var(--bg);
}

/* Main area layout */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* Sidebar (collapsible) */
.sidebar {
    width: 280px;
    background-color: var(--panel);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.3s ease, width 0.3s ease;
}

.sidebar.collapsed {
    width: 0;
    transform: translateX(-100%);
    overflow: hidden;
}

/* Add Node button (floats even when sidebar is collapsed) */
.add-node-button {
    position: fixed;
    left: 20px;
    top: 76px;
    padding: 8px 16px;
    background-color: var(--accent);
    color: var(--bg);
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.add-node-button.hidden {
    opacity: 0;
    transform: translateX(-20px);
    pointer-events: none;
}

/* Close button inside sidebar */
.sidebar-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--muted);
    font-size: 16px;
    z-index: 5;
}

.sidebar-close:hover {
    color: var(--text);
    background-color: var(--control-bg);
}

/* Search box in sidebar */
.search-box {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    padding: 16px 16px 8px;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Canvas & properties panel */
.canvas-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background-color: var(--canvas);
}

.properties-panel {
    width: 320px;
    background-color: var(--panel);
    border-left: 1px solid var(--border);
    overflow-y: auto;
    position: relative;
    transition: transform 0.3s ease, width 0.3s ease;
}

.properties-panel.collapsed {
    width: 0;
    transform: translateX(100%);
    overflow: hidden;
}

.properties-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--muted);
    font-size: 16px;
    z-index: 5;
}

.properties-close:hover {
    color: var(--text);
    background-color: var(--control-bg);
}

/* Canvas interaction */
.workflow-canvas {
    width: 100%;
    height: 100%;
    position: relative;
    cursor: grab;
}

.workflow-canvas.grabbing {
    cursor: grabbing;
}

.canvas-grid {
    position: absolute;
    width: 200%;
    height: 200%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

/* Nodes */
.node {
    position: absolute;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    min-width: 220px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    cursor: move;
    user-select: none;
}

.node.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.3), 0 4px 6px rgba(0, 0, 0, 0.3);
}

.node-header {
    padding: 10px 12px;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 14px;
    color: #161717;
    position: relative;
}

.node-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 18px;
    color: inherit;
}

.library-node .node-icon {
    font-size: 16px;
}

.node-execute {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    padding: 4px 8px;
    background: rgba(var(--accent-rgb), 0.2);
    border: 1px solid #161717;
    border-radius: 4px;
    color: #161717;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.node-execute:hover {
    background: rgba(var(--accent-rgb), 0.3);
}

.node-execute:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.node-body {
    padding: 12px;
    font-size: 13px;
    color: var(--text-muted);
    min-height: 40px;
}

.node-preview {
    width: 100%;
    height: 120px;
    object-fit: contain;
    object-position: center;
    border-radius: 4px;
    margin-top: 8px;
    background: var(--canvas);
    display: block;
    border: 1px solid var(--border);
}

/* Node info / debug states */
.node-debug-info {
    background: rgba(var(--accent-rgb), 0.1);
    border: 1px solid var(--accent);
    border-radius: 4px;
    padding: 8px;
    margin-top: 8px;
    font-size: 11px;
    color: var(--accent);
}

.node-error-info {
    background: rgba(var(--error-rgb), 0.1);
    border: 1px solid var(--error);
    border-radius: 4px;
    padding: 8px;
    margin-top: 8px;
    font-size: 11px;
    color: var(--error);
}

.node-warning-info {
    background: rgba(var(--warning-rgb), 0.1);
    border: 1px solid var(--accent);
    border-radius: 4px;
    padding: 8px;
    margin-top: 8px;
    font-size: 11px;
    color: var(--accent);
}

/* Node ports */
.node-port {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--port);
    border: 2px solid var(--panel);
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
}

.node-port:hover {
    background: var(--accent);
}

.node-port.input {
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
}

.node-port.output {
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
}

.node-port.connected {
    background: var(--success);
}

/* Connections */
.connection-line {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    pointer-events: stroke;
    cursor: pointer;
}

/* Hover effect for connection lines */
.connection-line:hover {
    stroke-width: 3;
}

/* Delete connection button */
.delete-connection-btn {
    fill: var(--error);
    stroke: #EDEDED;
    stroke-width: 0.5;
    pointer-events: all;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.connection-line-group:hover .delete-connection-btn {
    opacity: 1;
}

/* Zoom controls */
.zoom-controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    flex-direction: row;
    gap: 12px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    z-index: 5;
}

.zoom-btn-stack {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.zoom-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--control-bg);
    border: none;
    border-radius: 4px;
    color: var(--text);
    cursor: pointer;
    font-size: 18px;
}

.zoom-btn:hover {
    background: var(--control-bg-hover);
}

.canvas-quick-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.canvas-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--control-bg);
    border: none;
    border-radius: 4px;
    color: var(--text);
    cursor: pointer;
    font-size: 16px;
}

.canvas-action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.zoom-label {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top:8px
}

/* Execution status toast */
.execution-status {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    display: none;
    max-width: 300px;
    z-index: 5;
}

.execution-status.active {
    display: block;
}

.api-error-alert {
    border-radius: 10px;
    margin-bottom: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

/* Sidebar content */
.search-input {
    width: 100%;
    padding: 8px 12px;
    background: var(--canvas);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
}

.node-library {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.node-category {
    margin-bottom: 16px;
}

.node-category-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 8px;
}

/* Library node item */
.library-node {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 6px;
    cursor: grab;
}

.library-node:hover {
    background: var(--control-bg);
}

/* Properties */
.property-group {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.property-label {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 6px;
}

.property-input {
    width: 100%;
    padding: 8px 12px;
    background: var(--canvas);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
}

.property-select {
    width: 100%;
    padding: 8px 12px;
    background: var(--canvas);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
}

.property-slider {
    width: 100%;
    margin: 8px 0;
}

textarea.property-input {
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}

/* Node status indicators */
.node-status-indicator {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: none;
    z-index: 3;
}

.node-status-indicator.success {
    background: var(--success);
    display: block;
}

.node-status-indicator.running {
    background: var(--accent);
    display: block;
    animation: pulse 1.5s infinite;
}

.node-status-indicator.error {
    background: var(--error);
    display: block;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* File upload preview */
.file-upload-area {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    margin-top: 8px;
}

.file-upload-area:hover {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.1);
}
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.preview-image {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    margin-top: 12px;
    border-radius: 6px;
}

/* API Panel */
.api-panel {
    position: fixed;
    top: 60px;
    right: 20px;
    width: 420px;
    max-height: calc(100vh - 80px);
    bottom: 20px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    z-index: 1000;
    display: none;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

@media (max-width: 640px) {
    .api-panel {
        left: 16px;
        right: 16px;
        width: auto;
        top: 72px;
        bottom: 16px;
        max-height: calc(100vh - 88px);
    }
}

.api-panel.show {
    display: block;
}

.api-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.api-panel-title {
    font-size: 18px;
    font-weight: 600;
}
.admin-panel {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-height: none;
    margin: 0;
    padding: 24px;
    border-radius: 0;
    display: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-panel.show {
    display: flex;
    flex-direction: column;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-table-wrapper {
    flex: 1;
    overflow: auto;
    margin-top: 12px;
}

.admin-tab-bar {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.admin-tab {
    border-radius: 8px;
    border: 1px solid var(--border);
    padding: 6px 14px;
    background: transparent;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.admin-tab.active {
    background: var(--canvas);
    border-color: var(--accent);
    color: var(--accent);
}

.admin-tab-content {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.admin-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid var(--border);
    padding: 12px 10px;
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.admin-user-cell strong {
    display: block;
    font-size: 15px;
    margin-bottom: 4px;
}

.admin-user-meta {
    display: flex;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.admin-user-summary {
    font-size: 12px;
    color: var(--text-muted);
}

.admin-points-cell {
    font-size: 14px;
    color: var(--accent);
    font-weight: 600;
    width: 80px;
}

.admin-workflow-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-workflow-entry {
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border);
}

.admin-workflow-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.admin-workflow-meta {
    display: flex;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.admin-workflow-node-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.admin-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.admin-pill {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--canvas);
}

.admin-pill-muted {
    opacity: 0.7;
}

.admin-empty-value {
    font-size: 12px;
    color: var(--text-muted);
}

.admin-storage-card {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--canvas);
    max-height: 200px;
    overflow: auto;
}

.admin-organization-section {
    padding: 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--canvas);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.admin-organization-header {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.admin-organization-summary {
    font-size: 12px;
    color: var(--text-muted);
}

.admin-org-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.admin-org-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 960px;
    font-size: 13px;
}

.admin-org-table th,
.admin-org-table td {
    border-bottom: 1px solid var(--border);
    padding: 10px 8px;
    text-align: left;
    vertical-align: top;
}

.admin-org-table th {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.admin-table-subtext {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.admin-storage-preview {
    font-size: 12px;
    color: var(--text);
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-storage-entry {
    margin-bottom: 10px;
}

.admin-storage-pre {
    background: var(--canvas);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px;
    font-size: 12px;
    margin-top: 4px;
    max-height: 200px;
    overflow: auto;
}
.admin-contact-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.admin-user-management {
    margin-top: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--canvas);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-user-management-header {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.admin-hint-text {
    font-size: 12px;
    color: var(--text-muted);
    max-width: 400px;
}

.admin-user-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.admin-user-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.admin-user-form input,
.admin-user-form select {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    background: var(--panel);
    color: var(--text);
    font-size: 14px;
}

.admin-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.admin-form-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.admin-action-btn {
    border-radius: 8px;
    border: 1px solid transparent;
    background: var(--accent);
    color: #fff;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.admin-action-btn.secondary {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
}

.admin-action-btn-danger {
    background: var(--error);
    border-color: transparent;
    color: #fff;
}

.admin-action-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.admin-actions-cell {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-success-message {
    font-size: 13px;
    color: var(--success);
}

.error-message.admin-action-error {
    margin: 0;
}
.data-panel {
    width: 460px;
}
.data-panel-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.data-panel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.data-item-list {
    list-style: none;
    padding: 0;
    margin: 12px 0;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.data-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}
.data-item-row:last-child {
    border-bottom: none;
}
.data-item-remove {
    background: none;
    border: none;
    color: var(--error);
    cursor: pointer;
    font-size: 12px;
}
.data-item-remove:hover {
    text-decoration: underline;
}
.data-hint {
    font-size: 12px;
    color: var(--text-muted);
}
.data-summary-card {
    background: var(--canvas);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.leaderboard-panel {
    width: 420px;
}
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 360px;
    overflow-y: auto;
}
.leaderboard-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.leaderboard-row.current-user {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.08);
}
.leaderboard-rank {
    font-weight: 600;
    font-size: 14px;
}
.leaderboard-email {
    font-size: 12px;
    color: var(--text-muted);
}
.leaderboard-points {
    font-weight: 600;
    font-size: 14px;
}
.data-summary-pill {
    border: 1px dashed var(--border);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    color: var(--text);
    margin-top: 4px;
}
.user-points-pill {
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(var(--accent-rgb), 0.08);
}
.user-points-meta {
    color: var(--text-muted);
    font-size: 12px;
}
.scope-toggle-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}
.scope-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}
.scope-toggle input {
    margin-right: 4px;
}

.close-btn {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: var(--text);
}

.api-section {
    margin-bottom: 24px;
}

.api-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text);
}

.api-description {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 12px;
}

.api-link {
    color: var(--accent);
    text-decoration: none;
}

.api-link:hover {
    text-decoration: underline;
}

.api-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.api-input {
    flex: 1;
    width: 100%;
    display: block;
    padding: 8px 12px;
    background: var(--canvas);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 13px;
    box-sizing: border-box;
}

.api-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 8px;
}

.api-status.connected {
    background: var(--success);
    color: var(--bg);
}

.api-status.error {
    background: var(--error);
    color: var(--bg);
}

.test-btn {
    padding: 6px 12px;
    background: var(--neutral-hover);
    border: none;
    border-radius: 4px;
    color: var(--text);
    font-size: 12px;
    cursor: pointer;
}

.test-btn:hover {
    background: var(--neutral);
}

.success-message {
    background: rgba(var(--success-rgb), 0.1);
    border: 1px solid var(--success);
    border-radius: 6px;
    padding: 10px;
    color: var(--success);
    font-size: 12px;
    margin-top: 8px;
}

.error-message {
    background: rgba(var(--error-rgb), 0.1);
    border: 1px solid var(--error);
    border-radius: 6px;
    padding: 10px;
    color: var(--error);
    font-size: 12px;
    margin-top: 8px;
}

/* Tooltip styles */
.tooltip-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.info-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--muted);
    color: var(--panel);
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 6px;
}

.tooltip {
    visibility: hidden;
    position: fixed;
    width: 250px;
    background-color: var(--panel);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px;
    font-size: 12px;
    line-height: 1.5;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s, visibility 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    /* Position set via JS */
}

.info-icon:hover + .tooltip {
    visibility: visible;
    opacity: 1;
}

/* Tooltip shown via click */
.tooltip.active {
    visibility: visible;
    opacity: 1;
}

/* Dropdowns */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    padding: 0;
    border: none;
    background: transparent;
    color: #FEA0F6;
    font-size: 13px;
    font-weight: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dropdown-toggle.settings {
    background-color: transparent;
}

.dropdown-toggle.tools {
    background-color: transparent;
}

.dropdown-toggle.workflows {
    background-color: transparent;
}
.dropdown-toggle.data {
    background-color: transparent;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    min-width: 220px;
    background-color: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 100;
    display: none;
    padding: 6px 0;
    max-height: 400px;
    overflow-y: auto;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-header {
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}

.dropdown-item {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
}

/* .dropdown-item:hover {
    background-color: var(--control-bg-hover);
} */

/* Workflow list inside dropdowns */
.workflow-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(var(--border-rgb), 0.3);
}

.workflow-name {
    font-size: 13px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    color: var(--text);
}

.workflow-actions {
    display: flex;
    gap: 6px;
}

.workflow-btn {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 2px 4px;
    font-size: 12px;
    border-radius: 3px;
}

.workflow-btn:hover {
    background-color: var(--control-bg);
    color: var(--text);
}

.workflow-btn.load {
    color: var(--accent);
}

.workflow-btn.delete {
    color: var(--error);
}

.workflow-btn.export {
    color: var(--accent);
}

/* Workflow selector */
.workflow-selector {
    height: 32px;
    min-width: 140px;
    margin-right: 4px;
}

/* Tabs styling */
.tabs-container {
    display: flex;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.tab-button {
    padding: 8px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: var(--muted);
}

.tab-button.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-content {
    padding-top: 16px;
}

/* Property sections */
.property-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.section-header {
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-size: 14px;
}

.property-row {
    margin-bottom: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.position-preview {
    margin-bottom: 16px;
}

.hint-text {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
    font-style: italic;
}

.value-label {
    font-size: 12px;
    color: var(--muted);
    margin-left: 8px;
}















/* Modern DataPanel Styles - Pink & Black Theme */

.modern-data-panel {
    position: fixed;
    right: 0;
    top: 0;
    width: 420px;
    height: 100vh;
    background: #000000;
   
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    
  }
  
  .modern-panel-open {
    transform: translateX(0);
  }
  
  /* Header */
  .modern-panel-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
  }
  
  .modern-panel-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: #FEA0F6;
  }
  
  .modern-panel-icon {
    font-size: 24px;
  }
  
  .modern-close-btn {
    background: rgba(254, 160, 246, 0.1);
    border: 1px solid #FEA0F6;
    color: #FEA0F6;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
  }
  
  .modern-close-btn:hover {
    background: #FEA0F6;
    color: #000000;
    transform: scale(1.05);
  }
  
  /* Scope Selector */
  .modern-scope-selector {
    background: #0a0a0a;
    border-bottom: 1px solid #2a2a2a;
    padding: 16px 24px;
    flex-shrink: 0;
  }
  
  .modern-scope-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #FEA0F6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
  }
  
  .modern-scope-options {
    display: flex;
    gap: 8px;
    background: #000000;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 4px;
  }
  
  .modern-scope-option {
    flex: 1;
    text-align: center;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: #888;
    font-size: 14px;
    font-weight: 500;
  }
  
  .modern-scope-option input[type="radio"] {
    display: none;
  }
  
  .modern-scope-option.active {
    background: #2E3133;
    color: #EDEDED;
    font-weight: 600;
  }
  
  .modern-scope-option:not(.active):hover {
    background: rgba(254, 160, 246, 0.1);
    color: #FEA0F6;
  }
  
  /* Panel Content */
  .modern-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
  }
  
  .modern-panel-content::-webkit-scrollbar {
    width: 8px;
  }
  
  .modern-panel-content::-webkit-scrollbar-track {
    background: #0a0a0a;
  }
  
  .modern-panel-content::-webkit-scrollbar-thumb {
    background: #8c8c8c;
    border-radius: 4px;
  }
  
  .modern-panel-content::-webkit-scrollbar-thumb:hover {
    background: #EDEDED;
  }
  
  /* Section */
  .modern-data-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  
  .modern-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #EDEDED;
    padding-bottom: 12px;
    border-bottom: 2px solid #2a2a2a;
  }
  
  .modern-section-icon {
    font-size: 20px;
  }
  
  /* Control Group */
  .modern-control-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  /* Select */
  .modern-select {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
  }
  
  .modern-select:hover {
    border-color: #FEA0F6;
  }
  
  .modern-select:focus {
    border-color: #FEA0F6;
    box-shadow: 0 0 0 3px rgba(254, 160, 246, 0.1);
  }
  
  .modern-select option {
    background: #1a1a1a;
    color: #ffffff;
  }
  
  /* Button Group */
  .modern-button-group {
    display: flex;
    gap: 8px;
  }
  
  .modern-action-buttons {
    margin-top: 8px;
  }
  
  /* Buttons */
  .modern-btn {
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    outline: none;
  }
  
  .modern-btn-large {
    padding: 12px 20px;
    font-size: 15px;
    flex: 1;
  }
  
  .modern-btn-icon {
    font-size: 16px;
  }
  
  .modern-btn-primary {
    background: #2E3133;
    color: #EDEDED;
    
  }
  
  .modern-btn-primary:hover:not(:disabled) {
    background: #2E3133;
    /* box-shadow: 0 4px 12px rgba(254, 160, 246, 0.4); */
    transform: translateY(-1px);
  }
  
  .modern-btn-primary:disabled {
    background: #2a2a2a;
    color: #666;
    cursor: not-allowed;
    box-shadow: none;
  }
  
  .modern-btn-secondary {
    background: #1a1a1a;
    color: #EDEDED;
    /* border: 1px solid #FEA0F6; */
  }
  
  .modern-btn-secondary:hover {
    background: #2E3133;
    border-color: #ff90ea;
    color: #EDEDED;
  }
  
  .modern-btn-danger {
    background: rgba(255, 60, 60, 0.15);
    color: #ff6b6b;
    border: 1px solid #ff6b6b;
  }
  
  .modern-btn-danger:hover:not(:disabled) {
    background: rgba(255, 60, 60, 0.25);
    border-color: #ff5252;
    color: #ff5252;
  }
  
  .modern-btn-danger:disabled {
    background: #1a1a1a;
    color: #444;
    border-color: #2a2a2a;
    cursor: not-allowed;
  }
  
  /* Input Wrapper */
  .modern-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .modern-label {
    font-size: 13px;
    font-weight: 600;
    color: #FEA0F6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  /* Input */
  .modern-input {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
    outline: none;
  }
  
  .modern-input:hover {
    border-color: #FEA0F6;
  }
  
  .modern-input:focus {
    border-color: #FEA0F6;
    box-shadow: 0 0 0 3px rgba(254, 160, 246, 0.1);
  }
  
  .modern-input::placeholder {
    color: #555;
  }
  
  /* Textarea */
  .modern-textarea {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    min-height: 140px;
    resize: vertical;
    transition: all 0.2s;
    outline: none;
  }
  
  .modern-textarea:hover {
    border-color: #FEA0F6;
  }
  
  .modern-textarea:focus {
    border-color: #FEA0F6;
    box-shadow: 0 0 0 3px rgba(254, 160, 246, 0.1);
  }
  
  .modern-textarea::placeholder {
    color: #555;
  }
  
  /* Grid */
  .modern-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  
  /* Checkbox */
  .modern-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    transition: all 0.2s;
  }
  
  .modern-checkbox:hover {
    background: rgba(254, 160, 246, 0.05);
    border-color: #FEA0F6;
  }
  
  .modern-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #FEA0F6;
    cursor: pointer;
  }
  
  .modern-checkbox-label {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
  }
  
  /* File Upload */
  .modern-file-upload-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .modern-file-input-wrapper {
    position: relative;
  }
  
  .modern-file-input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    overflow: hidden;
  }
  
  .modern-file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    background: #1a1a1a;
    
    border-radius: 8px;
    color: #EDEDED;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
  }
  
  .modern-file-label:hover {
    background: rgba(254, 160, 246, 0.05);
    border-color: #FEA0F6;
  }
  
  .modern-file-icon {
    font-size: 20px;
  }
  
  /* Stats Card */
  .modern-stats-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 16px;
    align-items: center;
  }
  
  .modern-stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  
  .modern-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .modern-stat-value {
    font-size: 14px;
    font-weight: 700;
    color: #EDEDED;
  }
  
  .modern-stat-divider {
    width: 1px;
    height: 40px;
    background: #2a2a2a;
  }
  
  /* Alert */
  .modern-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
  }
  
  .modern-alert-icon {
    font-size: 18px;
    flex-shrink: 0;
  }
  
  .modern-alert-error {
    background: rgba(255, 60, 60, 0.15);
    
    color: #ff6b6b;
  }
  
  .modern-alert-info {
    background: rgba(254, 160, 246, 0.1);
    
    color: #FEA0F6;
  }
  
  /* File List */
  .modern-file-list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .modern-file-list {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
  }
  
  .modern-file-list::-webkit-scrollbar {
    width: 6px;
  }
  
  .modern-file-list::-webkit-scrollbar-track {
    background: #0a0a0a;
    border-radius: 3px;
  }
  
  .modern-file-list::-webkit-scrollbar-thumb {
    background: #FEA0F6;
    border-radius: 3px;
  }
  
  .modern-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #0a0a0a;
    border-radius: 6px;
    margin-bottom: 6px;
    transition: all 0.2s;
  }
  
  .modern-file-item:last-child {
    margin-bottom: 0;
  }
  
  .modern-file-item:hover {
    background: rgba(254, 160, 246, 0.05);
    
    padding-left: 9px;
  }
  
  .modern-file-name {
    color: #ffffff;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  /* Empty State */
  .modern-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
  }
  
  .modern-empty-icon {
    font-size: 64px;
    opacity: 0.3;
    margin-bottom: 16px;
  }
  
  .modern-empty-text {
    font-size: 16px;
    font-weight: 600;
    color: #FEA0F6;
    margin-bottom: 8px;
  }
  
  .modern-empty-subtext {
    font-size: 14px;
    color: #666;
  }
  
  /* Responsive */
  @media (max-width: 768px) {
    .modern-data-panel {
      width: 100%;
    }
    
    .modern-grid-2 {
      grid-template-columns: 1fr;
    }
  }









  /* BatchPanel.css */

/* Modal Overlay */
/* BatchPanel.css */

/* Modal Overlay */
.batch-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
  }
  
  /* Modal Container */
  .batch-modal-container {
    width: 100%;
    max-width: 600px;
    background: #252526;
    border: 1px solid rgba(254, 160, 246, 0.3);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
  }
  
  /* Header */
  .batch-modal-header {
    background: rgba(254, 160, 246, 0.1);
    padding: 20px 24px;
    border-bottom: 1px solid rgba(254, 160, 246, 0.3);
  }
  
  .batch-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #FEA0F6;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  /* Content */
  .batch-modal-content {
    padding: 24px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
  }
  
  /* Section */
  .batch-section {
    margin-bottom: 24px;
  }
  
  .batch-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #FEA0F6;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  /* Scope Selector */
  .batch-scope-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    padding: 4px;
    background: rgba(254, 160, 246, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(254, 160, 246, 0.2);
  }
  
  .batch-scope-btn {
    flex: 1;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }
  
  .batch-scope-btn.active {
    background: rgba(254, 160, 246, 0.2);
    border: 1px solid #FEA0F6;
    color: #FEA0F6;
  }
  
  /* Select Dropdown */
  .batch-select {
    width: 100%;
    padding: 10px 12px;
    background: rgba(254, 160, 246, 0.05);
    border: 1px solid rgba(254, 160, 246, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 8px;
    outline: none;
  }
  
  .batch-select option {
    background: #252526;
  }
  
  /* Summary Pill */
  .batch-summary-pill {
    padding: 10px 12px;
    background: rgba(254, 160, 246, 0.05);
    border: 1px solid rgba(254, 160, 246, 0.2);
    border-radius: 6px;
    font-size: 12px;
    color: #fff;
    margin-bottom: 8px;
  }
  
  .batch-summary-pill .text-muted {
    color: #9ca3af;
  }
  
  /* Manage Button */
  .batch-manage-btn {
    padding: 8px 14px;
    background: rgba(254, 160, 246, 0.1);
    border: 1px solid rgba(254, 160, 246, 0.3);
    border-radius: 6px;
    color: #FEA0F6;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
  }
  
  .batch-manage-btn:hover {
    background: rgba(254, 160, 246, 0.2);
  }
  
  /* Error Warning */
  .batch-error-warning {
    margin-top: 8px;
    padding: 10px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 6px;
    font-size: 12px;
    color: #ffc107;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  /* Info Text */
  .batch-info-text {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  
  /* Row Range Grid */
  .batch-row-range-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  
  .batch-input-group label {
    font-size: 12px;
    color: #FEA0F6;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
  }
  
  .batch-input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(254, 160, 246, 0.05);
    border: 1px solid rgba(254, 160, 246, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
  }
  
  .batch-input:focus {
    border-color: #FEA0F6;
  }
  
  /* Folder Select Button */
  .batch-folder-btn {
    width: 100%;
    padding: 12px 16px;
    background: rgba(254, 160, 246, 0.05);
    border: 1px solid rgba(254, 160, 246, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    font-weight: 500;
  }
  
  .batch-folder-btn.selected {
    background: rgba(254, 160, 246, 0.15);
    border-color: #FEA0F6;
    color: #FEA0F6;
  }
  
  .batch-folder-btn:hover {
    background: rgba(254, 160, 246, 0.2);
    border-color: #FEA0F6;
  }
  
  /* Progress Bar Container */
  .batch-progress-container {
    margin-top: 16px;
    padding: 14px 16px;
    background: rgba(254, 160, 246, 0.1);
    border: 1px solid rgba(254, 160, 246, 0.3);
    border-radius: 8px;
  }
  
  .batch-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
  }
  
  .batch-progress-status {
    font-size: 13px;
    color: #FEA0F6;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  
  .batch-progress-percent {
    font-size: 13px;
    color: #FEA0F6;
    font-weight: 600;
  }
  
  .batch-progress-bar-wrapper {
    width: 100%;
    height: 8px;
    background: #252526;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(254, 160, 246, 0.2);
  }
  
  .batch-progress-bar {
    height: 100%;
    background: #FEA0F6;
    transition: width 0.3s ease;
  }
  
  /* Footer */
  .batch-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(254, 160, 246, 0.3);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    background: rgba(0, 0, 0, 0.2);
  }
  
  .batch-btn-close {
    padding: 10px 24px;
    background: transparent;
    border: 1px solid rgba(254, 160, 246, 0.3);
    border-radius: 8px;
    color: #FEA0F6;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  
  .batch-btn-close:hover {
    background: rgba(254, 160, 246, 0.1);
  }
  
  .batch-btn-run {
    padding: 10px 32px;
    background: #FEA0F6;
    border: none;
    border-radius: 8px;
    color: #252526;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(254, 160, 246, 0.4);
    display: flex;
    align-items: center;
    gap: 6px;
  }
  
  .batch-btn-run:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(254, 160, 246, 0.5);
  }
  
  /* Responsive */
  @media (max-width: 768px) {
    .batch-row-range-grid {
      grid-template-columns: 1fr;
    }
    
    .batch-modal-content {
      max-height: calc(100vh - 150px);
    }
  }
