/* Rappture2Web Stylesheet */
:root {
    --rp-primary: #2563eb;
    --rp-primary-hover: #1d4ed8;
    --rp-bg: #f8fafc;
    --rp-sidebar-bg: #ffffff;
    --rp-border: #e2e8f0;
    --rp-text: #1e293b;
    --rp-text-muted: #64748b;
    --rp-success: #16a34a;
    --rp-error: #dc2626;
    --rp-radius: 6px;
}

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

/* Accessibility utilities */
.rp-sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.rp-skip-link {
    position: absolute; top: -100px; left: 8px; z-index: 9999;
    padding: 8px 16px; background: var(--rp-primary); color: #fff;
    border-radius: 0 0 var(--rp-radius) var(--rp-radius);
    font-weight: 600; text-decoration: none; font-size: 14px;
    transition: top 0.1s;
}
.rp-skip-link:focus { top: 0; outline: 3px solid #fff; outline-offset: 2px; }

/* Global focus-visible: consistent across all interactive elements */
:focus-visible {
    outline: 3px solid var(--rp-primary);
    outline-offset: 2px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: var(--rp-text);
    background: var(--rp-bg);
}

/* Header */
.rp-header {
    background: var(--rp-primary);
    color: white;
    padding: 12px 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.rp-title { font-size: 18px; font-weight: 600; }

/* Layout */
.rp-main { height: calc(100vh - 48px); }
.rp-layout {
    display: flex;
    height: 100%;
}
.rp-sidebar {
    width: 380px;
    min-width: 320px;
    max-width: 480px;
    background: var(--rp-sidebar-bg);
    border-right: 1px solid var(--rp-border);
    overflow-y: auto;
    padding: 16px;
    resize: horizontal;
}
.rp-content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 16px;
}

/* About */
.rp-about {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--rp-radius);
    padding: 10px 12px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--rp-text-muted);
}

/* Form */
.rp-form { display: flex; flex-direction: column; gap: 12px; }

/* Widgets */
.rp-widget {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.rp-widget.rp-disabled {
    opacity: 0.4;
    pointer-events: none;
}
.rp-widget[hidden] { display: none; }

.rp-label {
    font-weight: 500;
    font-size: 13px;
    color: var(--rp-text);
    cursor: help;
    display: flex;
    align-items: center;
    gap: 5px;
}
.rp-widget-icon {
    width: 16px;
    height: 22px;
    flex-shrink: 0;
    object-fit: contain;
    vertical-align: middle;
}
.rp-therm-icon {
    width: 12px;
    height: 22px;
}
.rp-units {
    font-weight: 400;
    color: var(--rp-text-muted);
    font-size: 12px;
}
.rp-hints {
    font-size: 12px;
    color: var(--rp-text-muted);
}

/* Inputs */
.rp-input {
    padding: 6px 10px;
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius);
    font-size: 14px;
    font-family: inherit;
    background: white;
    transition: border-color 0.15s;
}
.rp-input:focus {
    outline: none;
    border-color: var(--rp-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.rp-input-number, .rp-input-integer {
    width: 100%;
    font-variant-numeric: tabular-nums;
}
.rp-input-string, .rp-input-textarea {
    width: 100%;
}
.rp-input-textarea {
    resize: vertical;
    font-family: "SF Mono", Monaco, "Cascadia Mono", monospace;
    font-size: 13px;
}
.rp-input-choice {
    width: 100%;
}

/* Number with presets */
.rp-number-controls {
    display: flex;
    gap: 6px;
}
.rp-number-controls .rp-input-number { flex: 1; }
.rp-preset-select {
    padding: 6px 8px;
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius);
    font-size: 12px;
    background: white;
    cursor: pointer;
    max-width: 160px;
}

/* Boolean */
.rp-boolean-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.rp-input-boolean {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Group */
.rp-group {
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius);
    padding: 12px;
}
.rp-group-legend {
    font-weight: 600;
    font-size: 13px;
    padding: 0 6px;
    color: var(--rp-text);
}
.rp-group-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.rp-horizontal {
    flex-direction: row;
    flex-wrap: wrap;
}
.rp-horizontal > .rp-widget {
    flex: 1;
    min-width: 120px;
}

/* Tabs */
.rp-group-tabbed {
    border: none;
    padding: 0;
}
.rp-group-header {
    font-weight: 600;
    margin-bottom: 8px;
}
.rp-tab-buttons {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--rp-border);
}
.rp-tab-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--rp-text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
}
.rp-tab-btn:hover { color: var(--rp-text); }
.rp-tab-btn.active, .rp-tab-btn[aria-selected="true"] {
    color: var(--rp-primary);
    border-bottom-color: var(--rp-primary);
}
.rp-tab-panel {
    display: none;
    padding: 12px 0;
}
.rp-tab-panel.active, .rp-tab-panel:not([hidden]) { display: flex; flex-direction: column; gap: 10px; }

/* multichoice fieldset reset */
.rp-multichoice-fieldset { border: none; padding: 0; min-inline-size: 0; }

/* Phase */
.rp-phase {
    border-left: 3px solid var(--rp-primary);
    padding-left: 12px;
}
.rp-phase-header {
    font-weight: 600;
    color: var(--rp-primary);
    margin-bottom: 8px;
}

/* Phase tab strip (top-level phases) */
.rp-phase-tabs {
    display: flex;
    border-bottom: 2px solid var(--rp-border);
    margin-bottom: 12px;
    gap: 2px;
    flex-wrap: wrap;
}
.rp-phase-tab {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    background: transparent;
    color: var(--rp-text-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.rp-phase-tab:hover {
    background: var(--rp-bg);
    color: var(--rp-text);
}
.rp-phase-tab-active {
    background: var(--rp-sidebar-bg);
    color: var(--rp-primary);
    border-color: var(--rp-border);
    margin-bottom: -2px;
    padding-bottom: 8px;
}
.rp-phase-panel {
    animation: fadeIn 0.15s ease;
}

/* Separator */
.rp-separator {
    border: none;
    border-top: 1px solid var(--rp-border);
    margin: 8px 0;
}

/* Actions */
.rp-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--rp-border);
}
.rp-btn {
    padding: 8px 20px;
    border: none;
    border-radius: var(--rp-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.rp-btn-simulate {
    background: var(--rp-primary);
    color: white;
}
.rp-btn-simulate:hover { background: var(--rp-primary-hover); }
.rp-btn-simulate:disabled {
    background: var(--rp-text-muted);
    cursor: not-allowed;
}
.rp-btn-simulate.running {
    background: var(--rp-text-muted);
}
.rp-btn-upload {
    background: #f1f5f9;
    color: var(--rp-text);
    border: 1px solid var(--rp-border);
}
.rp-btn-upload:hover { background: #e2e8f0; }
.rp-status {
    font-size: 13px;
    color: var(--rp-text-muted);
}
.rp-status.error { color: var(--rp-error); }
.rp-status.success { color: var(--rp-success); }

/* Results */
.rp-results { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.rp-results-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: var(--rp-text-muted);
    font-size: 15px;
}
.rp-results-warn {
    flex-direction: column;
    text-align: center;
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: var(--rp-radius);
    padding: 24px;
    margin: 16px;
}

/* Output selector bar */
.rp-output-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-bottom: 1px solid var(--rp-border);
    background: var(--rp-bg-secondary);
    flex-shrink: 0;
}
.rp-output-selector {
    flex: 1;
    max-width: 420px;
    padding: 5px 8px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius);
    background: var(--rp-bg);
    color: var(--rp-text);
    cursor: pointer;
    outline-offset: 2px;
}
.rp-output-selector:focus-visible {
    outline: 3px solid var(--rp-primary);
}
.rp-output-panels { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.rp-output-panel { display: none; padding: 16px; box-sizing: border-box; overflow: hidden; }
.rp-output-panel.active { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* Output items */
.rp-output-item {
    margin-bottom: 20px;
    background: white;
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius);
    overflow: hidden;
}
.rp-output-item.rp-output-plot-item {
    flex: 1;
    min-height: 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}
.rp-output-item.rp-output-plot-item .rp-output-body {
    flex: 1;
    min-height: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    overflow: hidden;
}
.rp-output-header {
    padding: 10px 14px;
    background: #f1f5f9;
    border-bottom: 1px solid var(--rp-border);
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}
.rp-output-body {
    padding: 14px;
}

/* Output: number */
.rp-output-number .rp-output-value {
    font-size: 24px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.rp-output-number .rp-output-units {
    font-size: 16px;
    color: var(--rp-text-muted);
    margin-left: 4px;
}

/* Output: string/log */
.rp-output-log .rp-output-body {
    font-family: "SF Mono", Monaco, "Cascadia Mono", monospace;
    font-size: 13px;
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
    background: #1e293b;
    color: #e2e8f0;
    padding: 14px;
}

/* Output: image */
.rp-output-image img {
    max-width: 100%;
    height: auto;
}

/* Output: curve/histogram (Plotly container) */
.rp-output-plot {
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

/* Output: 3D field */
.rp-output-field { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.rp-output-field .rp-output-body { flex: 1; min-height: 0; padding: 0; overflow: hidden; border-radius: 0 0 var(--rp-radius) var(--rp-radius); display: flex; flex-direction: column; }
.rp-3d-wrap { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
.rp-3d-inner-row { flex: 1; min-height: 0; display: flex; flex-direction: row; align-items: stretch; }
.rp-3d-canvas-wrap { position: relative; flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.rp-3d-canvas-wrap canvas { display: block; width: 100% !important; flex: 1; min-height: 0; cursor: grab; }
.rp-3d-canvas-wrap canvas:active { cursor: grabbing; }

/* Right-side collapsible control panel */
.rp-3d-panel-wrap {
    display: flex; flex-direction: row; flex-shrink: 0;
    align-self: stretch; min-height: 0;
    position: relative;
}
.rp-3d-panel-tab {
    width: 20px; flex-shrink: 0; cursor: pointer;
    background: #475569;
    border-left: 2px solid #94a3b8; border-right: 2px solid #94a3b8;
    display: flex; align-items: center; justify-content: center;
    color: #f1f5f9; font-size: 14px; font-weight: bold; user-select: none;
    transition: background 0.15s, color 0.15s;
    box-shadow: -2px 0 6px rgba(0,0,0,0.35);
}
.rp-3d-panel-tab:hover { background: #64748b; color: #fff; }
.rp-3d-panel {
    width: 240px; flex-shrink: 0; overflow-y: auto;
    background: #1e293b; border-left: 1px solid #334155;
    padding: 8px; display: flex; flex-direction: column; gap: 6px;
    font-size: 12px; align-self: stretch;
    transition: width 0.2s ease, padding 0.2s ease, opacity 0.2s ease;
}
.rp-3d-panel-wrap.collapsed .rp-3d-panel {
    width: 0; padding: 0; opacity: 0; overflow: hidden; border: none;
}
.rp-3d-panel-tab .rp-tab-chevron { transition: transform 0.2s; }
.rp-3d-panel-wrap.collapsed .rp-tab-chevron { transform: rotate(180deg); }
.rp-panel-section {
    background: #0f172a; border-radius: 4px; padding: 8px;
    display: flex; flex-direction: column; gap: 4px;
}
.rp-panel-title {
    font-size: 12px; font-weight: 700; color: #64748b;
    text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 4px;
}
.rp-panel-btns { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 2px; }
.rp-panel-section label {
    display: flex; flex-direction: column; gap: 2px;
    color: #94a3b8; font-size: 12px;
}
.rp-panel-section input[type=range] { width: 100%; cursor: pointer; }
.rp-panel-section input[type=number] {
    width: 100%; padding: 2px 4px; font-size: 12px;
    background: #1e293b; color: #e2e8f0;
    border: 1px solid #334155; border-radius: 3px;
}

/* Legacy toolbar styles kept for any remaining uses */
.rp-3d-toolbar {
    display: flex; flex-direction: column; gap: 0;
    background: var(--rp-bg-secondary);
    border-top: 1px solid var(--rp-border); font-size: 12px;
}
.rp-3d-toolbar-row {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    padding: 5px 10px; border-bottom: 1px solid var(--rp-border);
}
.rp-3d-toolbar-row:last-child { border-bottom: none; }
.rp-3d-toolbar label { color: var(--rp-text-muted); white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.rp-3d-toolbar input[type=range] { width: 80px; cursor: pointer; vertical-align: middle; }
.rp-3d-toolbar input[type=number] {
    width: 72px; padding: 2px 4px; font-size: 12px;
    background: var(--rp-bg); color: var(--rp-text);
    border: 1px solid var(--rp-border); border-radius: 3px;
}
.rp-3d-btn {
    padding: 3px 8px; border: 1px solid var(--rp-border); border-radius: 4px;
    background: var(--rp-bg); color: var(--rp-text); cursor: pointer; font-size: 12px;
    white-space: nowrap;
}
.rp-3d-btn:hover { background: var(--rp-primary); color: #fff; border-color: var(--rp-primary); }
.rp-3d-btn.active { background: var(--rp-primary); color: #fff; border-color: var(--rp-primary); }
.rp-3d-sep { color: var(--rp-border); user-select: none; padding: 0 2px; }
.rp-3d-colorbar {
    display: flex; align-items: center; gap: 8px;
    padding: 4px 10px; font-size: 12px; color: var(--rp-text-muted);
    background: var(--rp-bg-secondary);
}
.rp-3d-colorbar-gradient {
    flex: 1; height: 10px; border-radius: 3px;
    background: linear-gradient(to right,#00008b,#0000ff,#00ffff,#00ff00,#ffff00,#ff0000);
}

/* Loader */
.rp-loader-controls { display: flex; flex-direction: column; gap: 4px; }
.rp-input-file {
    padding: 6px;
    border: 1px dashed var(--rp-border);
    border-radius: var(--rp-radius);
}

/* Note */
.rp-note {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--rp-radius);
    padding: 10px 12px;
}
.rp-note-label { font-weight: 600; margin-bottom: 4px; }
.rp-note-text { font-size: 13px; color: var(--rp-text-muted); }

/* Multichoice */
.rp-multichoice-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.rp-multichoice-option {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
}

/* Image display */
.rp-image-display img {
    max-width: 100%;
    border-radius: var(--rp-radius);
}

/* Run history */
.rp-run-history-panel {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--rp-border);
}
.rp-run-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--rp-text-muted);
    margin-bottom: 8px;
}
.rp-run-select-all-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.rp-run-history {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.rp-run-empty {
    font-size: 13px;
    color: var(--rp-text-muted);
}

/* Run row */
.rp-run-row {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 3px 4px;
    border-radius: var(--rp-radius);
    border: 1px solid transparent;
    transition: background 0.1s;
    cursor: grab;
}
.rp-run-row:hover { background: #f1f5f9; }
.rp-run-row.rp-run-top {
    background: #eff6ff;
    border-color: #bfdbfe;
}
.rp-run-row.rp-run-dragging { opacity: 0.4; }
.rp-run-row.rp-run-drag-over { outline: 2px dashed var(--rp-primary); }

.rp-run-check { cursor: pointer; flex-shrink: 0; }

/* Color swatch */
.rp-color-wrap {
    position: relative;
    flex-shrink: 0;
}
.rp-run-color {
    width: 18px;
    height: 18px;
    padding: 0;
    border: 2px solid rgba(0,0,0,0.15);
    border-radius: 4px;
    cursor: pointer;
    display: block;
}
.rp-run-color:hover { border-color: var(--rp-primary); }

.rp-color-popup {
    position: absolute;
    left: 0;
    top: 22px;
    z-index: 999;
    background: white;
    border: 1px solid var(--rp-border);
    border-radius: 6px;
    padding: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    width: 140px;
}
.rp-color-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    margin-bottom: 6px;
}
.rp-color-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
}
.rp-color-dot:hover { transform: scale(1.2); }
.rp-color-dot.active { border-color: #1e293b; }
.rp-color-hex-row { display: flex; }
.rp-color-hex-input {
    width: 100%;
    font-size: 12px;
    padding: 3px 6px;
    border: 1px solid var(--rp-border);
    border-radius: 4px;
    font-family: monospace;
}

/* Up/down reorder buttons */
.rp-run-reorder-btn {
    flex-shrink: 0;
    padding: 0 3px;
    background: none;
    border: none;
    color: var(--rp-text-muted);
    font-size: 12px;
    cursor: pointer;
    line-height: 1.2;
    opacity: 0.5;
}
.rp-run-reorder-btn:hover:not(:disabled) { opacity: 1; color: var(--rp-primary); }
.rp-run-reorder-btn:disabled { opacity: 0.15; cursor: default; }

/* Run label */
.rp-run-label {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: text;
    padding: 2px 4px;
    border-radius: 3px;
}
.rp-run-label:hover { background: #e2e8f0; }
.rp-run-label-top {
    font-weight: 600;
    color: var(--rp-primary);
}
.rp-run-rename-input {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    padding: 2px 4px;
    border: 1px solid var(--rp-primary);
    border-radius: 3px;
    outline: none;
}

.rp-run-status {
    font-size: 12px;
    color: var(--rp-error);
    flex-shrink: 0;
}
.rp-run-upload-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 1px 4px;
    background: #dbeafe;
    color: #1d4ed8;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: default;
}
.rp-run-delete {
    flex-shrink: 0;
    padding: 1px 5px;
    background: none;
    border: 1px solid transparent;
    border-radius: var(--rp-radius);
    color: var(--rp-text-muted);
    font-size: 13px;
    cursor: pointer;
    line-height: 1;
    transition: all 0.15s;
}
.rp-run-delete:hover {
    background: #fee2e2;
    border-color: var(--rp-error);
    color: var(--rp-error);
}

/* Responsive */
@media (max-width: 768px) {
    .rp-layout { flex-direction: column; }
    .rp-sidebar {
        width: 100%;
        max-width: none;
        max-height: 50vh;
        resize: none;
    }
}

/* Periodic Element */
.rp-periodicelement .rp-pe-selected-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 13px;
    padding: 5px 8px;
    border: 1px solid var(--rp-border);
    border-radius: 4px;
    background: var(--rp-sidebar-bg, #ffffff);
    user-select: none;
}
.rp-periodicelement .rp-pe-selected-row:hover {
    border-color: var(--rp-accent);
}
.rp-pe-arrow {
    margin-left: auto;
    color: var(--rp-text-muted);
    display: flex;
    align-items: center;
    transition: transform 0.15s;
}
.rp-pe-arrow.rp-pe-arrow-open {
    transform: rotate(180deg);
}
.rp-pe-table-wrap {
    border: 1px solid var(--rp-border);
    border-radius: 4px;
    padding: 6px;
    background: #f0f0f0;
    margin-bottom: 4px;
    overflow-x: auto;
}
.rp-pe-swatch {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    border: 1px solid #555;
    flex-shrink: 0;
    background: #444;
}
.rp-pe-selected-name {
    color: var(--rp-text);
}
.rp-pe-table {
    border-collapse: collapse;
    table-layout: fixed;
}
.rp-pe-cell {
    width: 24px;
    height: 22px;
    font-size: 9px;
    text-align: center;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.15);
    color: #111;
    font-weight: 600;
    user-select: none;
    transition: filter 0.1s, outline 0.1s;
}
.rp-pe-cell:hover:not(.rp-pe-disabled):not(.rp-pe-empty) {
    filter: brightness(1.15);
    outline: 2px solid #fff;
    outline-offset: -2px;
    z-index: 1;
    position: relative;
}
.rp-pe-cell.rp-pe-selected {
    outline: 2px solid #fff;
    outline-offset: -2px;
    filter: brightness(1.2);
    z-index: 2;
    position: relative;
}
.rp-pe-cell.rp-pe-disabled {
    background: #ccc !important;
    cursor: default;
    color: #999;
    font-weight: 400;
}
.rp-pe-cell.rp-pe-empty {
    background: transparent !important;
    border-color: transparent;
    cursor: default;
}

/* Plain data table fallback */
.rp-data-table {
    border-collapse: collapse;
    font-size: 12px;
    width: 100%;
}
.rp-data-table th {
    background: #1a1a2e;
    color: #8892b0;
    padding: 4px 10px;
    text-align: left;
    border-bottom: 1px solid #333;
    font-weight: 600;
}
.rp-data-table td {
    padding: 3px 10px;
    border-bottom: 1px solid #222;
    color: #ccd6f6;
}
.rp-data-table tbody tr:hover td {
    background: #0d1117;
}

/* Sequence slider controls */
.rp-seq-controls {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
    padding-bottom: 8px;
}
.rp-seq-top-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.rp-seq-btn {
    background: var(--rp-primary, #2563eb);
    color: #fff;
    border: none;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s;
}
.rp-seq-btn:hover {
    background: var(--rp-primary-hover, #1d4ed8);
}
.rp-seq-label {
    flex: 1;
    text-align: center;
    font-size: 13px;
    color: var(--rp-text, #1e293b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rp-seq-slider-wrap {
    padding: 2px 0;
}
.rp-seq-slider {
    width: 100%;
    height: 6px;
    cursor: pointer;
    accent-color: var(--rp-primary, #2563eb);
}
