.re-modal-content {
    background: #1a1a2e;
    width: 95vw;
    height: 90vh;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #333;
}

.re-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #16213e;
    border-bottom: 1px solid #333;
    flex-shrink: 0;
}

.re-toolbar-left, .re-toolbar-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

.re-btn {
    padding: 6px 14px;
    border: 1px solid #444;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    background: #2a2a3e;
    color: #ddd;
}

.re-btn:hover { background: #3a3a4e; }

.re-btn-accent { background: #5c6bc0; border-color: #5c6bc0; color: #fff; }
.re-btn-accent:hover { background: #7986cb; }

.re-btn-secondary { background: #2a2a3e; border-color: #444; color: #ccc; }
.re-btn-secondary:hover { background: #3a3a4e; }

.re-btn-danger { background: #c62828; border-color: #c62828; color: #fff; }
.re-btn-danger:hover { background: #e53935; }

.re-select {
    padding: 6px 10px;
    background: #2a2a3e;
    border: 1px solid #444;
    border-radius: 6px;
    color: #ddd;
    font-size: 13px;
}

.re-main-area {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

.re-canvas-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background-color: #1a1a2e;
    background-image: radial-gradient(circle, #333 1px, transparent 1px);
    background-size: 20px 20px;
    cursor: grab;
}

.re-viewport {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.re-svg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 10000px;
    height: 10000px;
    pointer-events: none;
    overflow: visible;
}

.re-node-layer {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
}

.re-connection {
    fill: none;
    stroke: #5c6bc0;
    stroke-width: 2;
    pointer-events: none;
}

.re-connection-hit {
    fill: none;
    stroke: transparent;
    stroke-width: 14;
    cursor: pointer;
}

.re-connection:hover {
    stroke: #7986cb;
    stroke-width: 3;
}

.re-connection-temp {
    stroke: #ff9800;
    stroke-dasharray: 8 4;
    stroke-width: 2;
}

.re-node {
    position: absolute;
    width: 260px;
    background: #222240;
    border: 1px solid #444;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    user-select: none;
    transition: box-shadow 0.2s;
}

.re-node:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.5); }

.re-node-selected {
    border-color: #5c6bc0;
    box-shadow: 0 0 0 2px rgba(92,107,192,0.4), 0 4px 12px rgba(0,0,0,0.5);
}

.re-node-dragging { opacity: 0.85; z-index: 100; }

.re-node-fixed { border-style: solid; }

.re-node-header {
    padding: 8px 12px;
    border-radius: 7px 7px 0 0;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
}

.re-node-title { pointer-events: none; }

.re-node-delete {
    cursor: pointer;
    font-size: 16px;
    opacity: 0.6;
    transition: opacity 0.2s;
    pointer-events: all;
}

.re-node-delete:hover { opacity: 1; color: #ff5252; }

.re-node-body {
    padding: 6px 0 8px 0;
}

.re-node-port-row {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    gap: 6px;
}

.re-node-port-input-row {
    justify-content: flex-start;
}

.re-node-port-output-row {
    justify-content: flex-end;
}

.re-port {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #5c6bc0;
    background: #1a1a2e;
    cursor: crosshair;
    transition: all 0.2s;
    pointer-events: all;
    flex-shrink: 0;
}

.re-port:hover {
    background: #5c6bc0;
    transform: scale(1.3);
}

.re-port-snap {
    width: 14px;
    height: 14px;
    box-shadow: 0 0 8px 2px rgba(92,107,192,0.6);
    background: #7986cb;
}

.re-port-input { border-color: #ef5350; }
.re-port-input:hover { background: #ef5350; }

.re-port-output { border-color: #66bb6a; }
.re-port-output:hover { background: #66bb6a; }

.re-port-label {
    font-size: 10px;
    color: #888;
}

.re-node-fields {
    padding: 0 8px;
}

.re-node-field {
    margin-bottom: 6px;
}

.re-node-field-label {
    font-size: 11px;
    color: #b0bec5;
    margin-bottom: 2px;
}

.re-node-field-input {
    width: 100%;
    padding: 4px 8px;
    background: #1a1a2e;
    border: 1px solid #444;
    border-radius: 4px;
    color: #ddd;
    font-size: 12px;
    box-sizing: border-box;
}

.re-node-field-input:focus { border-color: #5c6bc0; outline: none; }

.re-node-field-select {
    width: 100%;
    padding: 4px 8px;
    background: #1a1a2e;
    border: 1px solid #444;
    border-radius: 4px;
    color: #ddd;
    font-size: 12px;
    box-sizing: border-box;
}

.re-node-field-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #b0bec5;
}

.re-node-field-textarea {
    width: 100%;
    padding: 4px 8px;
    background: #1a1a2e;
    border: 1px solid #444;
    border-radius: 4px;
    color: #ddd;
    font-size: 12px;
    resize: vertical;
    box-sizing: border-box;
}

.re-node-field-textarea:focus { border-color: #5c6bc0; outline: none; }

.re-node[data-node-type="notification"] .re-node-field-textarea {
    min-height: 120px;
}

.re-node-conditions, .re-node-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.re-node-cond-section-label {
    font-size: 11px;
    color: #ffb74d;
    font-weight: bold;
    padding: 2px 0;
    border-bottom: 1px solid #333;
    margin-bottom: 2px;
}

.re-node-cond-row {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.re-node-item-row {
    display: flex;
    gap: 3px;
    align-items: center;
}

.re-node-cond-del {
    background: none;
    border: none;
    color: #e53935;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 4px;
    flex-shrink: 0;
}

.re-node-cond-del:hover { color: #ff5252; }

.re-cond-detail-wrap {
    margin-left: 4px;
    padding: 4px 6px;
    background: rgba(0,0,0,0.2);
    border: 1px solid #333;
    border-radius: 4px;
}

.re-cond-server-time {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.re-cond-weekday-row label {
    color: #b0bec5;
}

.re-cond-item {
    display: flex;
    gap: 4px;
    align-items: center;
}

.re-node[data-node-type="comment"] {
    opacity: 0.85;
    border-style: dashed;
}

.re-node[data-node-type="comment"] .re-node-header {
    background: #78909c !important;
}

.re-node[data-node-type="comment"] .re-node-body {
    background: rgba(120,144,156,0.1);
}

.re-node-variables {
    margin-top: 2px;
}

.re-node-var-toggle {
    font-size: 11px;
    color: #7986cb;
    cursor: pointer;
    padding: 2px 0;
    user-select: none;
}

.re-node-var-toggle:hover {
    color: #9fa8da;
}

.re-node-var-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.re-node-var-btn {
    padding: 2px 6px;
    background: rgba(92,107,192,0.15);
    border: 1px solid rgba(92,107,192,0.3);
    border-radius: 3px;
    color: #7986cb;
    cursor: pointer;
    font-size: 10px;
    white-space: nowrap;
}

.re-node-var-btn:hover { background: rgba(92,107,192,0.3); }

.re-node-add-btn {
    width: 100%;
    padding: 3px 8px;
    background: rgba(92,107,192,0.15);
    border: 1px solid rgba(92,107,192,0.3);
    border-radius: 4px;
    color: #7986cb;
    cursor: pointer;
    font-size: 11px;
    margin-top: 4px;
}

.re-node-add-btn:hover { background: rgba(92,107,192,0.25); }

.re-node-cooldown {
    margin-top: 2px;
}

.re-node-cd-row {
    display: flex;
    gap: 4px;
}

.re-node-cd-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.re-node-cd-item label {
    font-size: 10px;
    color: #888;
}

.re-node-cd-item input {
    width: 100%;
    padding: 3px 4px;
    background: #1a1a2e;
    border: 1px solid #444;
    border-radius: 4px;
    color: #ddd;
    font-size: 11px;
    text-align: center;
    box-sizing: border-box;
}

.re-node-cd-item input:focus { border-color: #5c6bc0; outline: none; }

.re-node-cooldown-disabled {
    opacity: 0.4;
}

.re-context-menu {
    position: fixed;
    background: #222240;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 6px 0;
    min-width: 180px;
    z-index: 10000;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

.re-context-menu-item {
    padding: 8px 15px;
    cursor: pointer;
    color: #ddd;
    font-size: 13px;
    transition: background 0.2s;
}

.re-context-menu-item:hover {
    background: rgba(92,107,192,0.2);
}

.re-load-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
}

.re-load-modal {
    background: #1a1a2e;
    border: 1px solid #444;
    border-radius: 12px;
    width: 750px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.re-load-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #333;
}

.re-load-modal-header h3 {
    margin: 0;
    color: #ddd;
    font-size: 16px;
}

.re-load-modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 22px;
    cursor: pointer;
    padding: 0 4px;
}

.re-load-modal-close:hover {
    color: #ff5252;
}

.re-load-modal-body {
    padding: 15px 20px;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.re-load-modal-search {
    width: 100%;
    padding: 8px 12px;
    background: #2a2a3e;
    border: 1px solid #444;
    border-radius: 6px;
    color: #ddd;
    font-size: 13px;
    box-sizing: border-box;
    margin-bottom: 12px;
}

.re-load-modal-search:focus {
    border-color: #5c6bc0;
    outline: none;
}

.re-load-modal-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.re-load-rule-card {
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 5px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.2s;
}

.re-load-rule-card:hover {
    border-color: #5c6bc0;
}

.re-load-rule-name-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.re-load-rule-name {
    color: #5c6bc0;
    font-size: 16px;
    font-weight: bold;
}

.re-load-rule-id {
    color: #b0bec5;
    font-size: 11px;
}

.re-load-rule-status {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 3px;
    margin-left: 8px;
}

.re-load-rule-status.enabled {
    background: #4caf50;
    color: #fff;
}

.re-load-rule-status.disabled {
    background: #ef5350;
    color: #fff;
}

.re-load-rule-section {
    color: #b0bec5;
    font-size: 13px;
}

.re-load-rule-section-title {
    font-weight: bold;
    margin-bottom: 4px;
}

.re-cond-title { color: #e94560; }
.re-sec-title { color: #ff9800; }
.re-exec-title { color: #2196f3; }
.re-after-title { color: #4caf50; }
.re-cd-title { color: #ff5722; }

.re-load-rule-detail {
    margin-left: 10px;
    font-size: 13px;
    color: #b0bec5;
    line-height: 1.6;
}

.re-load-rule-btn-row {
    margin-top: 6px;
    text-align: right;
}

.re-load-rule-btn {
    padding: 6px 16px;
    background: #5c6bc0;
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
}

.re-load-rule-btn:hover {
    background: #7986cb;
}

.re-load-rule-del-btn {
    padding: 6px 16px;
    background: #c62828;
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
}

.re-load-rule-del-btn:hover {
    background: #e53935;
}

.re-load-empty {
    text-align: center;
    color: #666;
    padding: 30px;
    font-size: 13px;
}

.re-share-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.re-share-modal {
    background: #1e1e2e;
    border-radius: 12px;
    width: 600px;
    max-width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.re-share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #333;
}

.re-share-modal-header h3 {
    margin: 0;
    color: #e0e0e0;
    font-size: 16px;
}

.re-share-tabs {
    display: flex;
    border-bottom: 1px solid #333;
}

.re-share-tab {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.re-share-tab.active {
    color: #7c4dff;
    border-bottom-color: #7c4dff;
}

.re-share-tab:hover {
    color: #b388ff;
}

.re-share-panel {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

.re-share-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.re-share-card {
    background: #252536;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 12px 16px;
    transition: border-color 0.2s;
}

.re-share-card:hover {
    border-color: #7c4dff;
}

.re-share-card-desc {
    color: #aaa;
    font-size: 12px;
    margin: 6px 0;
}

.re-share-card-info {
    display: flex;
    gap: 12px;
    color: #666;
    font-size: 11px;
    margin-bottom: 8px;
}

.re-share-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.re-share-desc-input {
    flex: 1;
    padding: 8px 12px;
    background: #252536;
    border: 1px solid #444;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 13px;
}

.re-share-desc-input:focus {
    outline: none;
    border-color: #7c4dff;
}

.re-share-count {
    color: #888;
    font-size: 12px;
    margin-bottom: 8px;
}

.re-preview-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 110;
}

.re-preview-modal {
    background: #1e1e2e;
    border-radius: 12px;
    width: 650px;
    max-width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.re-preview-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #333;
}

.re-preview-modal-header h3 {
    margin: 0;
    color: #e0e0e0;
    font-size: 16px;
}

.re-preview-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}

.re-preview-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}

.re-preview-label {
    color: #888;
    white-space: nowrap;
    min-width: 80px;
}

.re-preview-value {
    color: #e0e0e0;
}

.re-preview-section {
    margin-top: 12px;
}

.re-preview-section-title {
    color: #7c4dff;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #333;
}

.re-preview-node-card {
    background: #252536;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 6px;
}

.re-preview-node-header {
    margin-bottom: 4px;
}

.re-preview-node-type {
    font-size: 12px;
    font-weight: 600;
}

.re-preview-detail {
    color: #bbb;
    font-size: 12px;
    padding: 2px 0 2px 12px;
    border-left: 2px solid #444;
    margin-left: 4px;
}

.re-cmd-list-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.re-cmd-list-items {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-height: 120px;
    overflow-y: auto;
}

.re-cmd-list-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 6px;
    background: rgba(33,150,243,0.1);
    border: 1px solid rgba(33,150,243,0.3);
    border-radius: 4px;
}

.re-cmd-list-item-name {
    flex: 1;
    font-size: 11px;
    color: #64b5f6;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.re-cmd-list-item-del {
    background: rgba(33,150,243,0.2);
    border: 1px solid #2196f3;
    color: #64b5f6;
    padding: 1px 6px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
    flex-shrink: 0;
}

.re-cmd-list-item-del:hover {
    background: rgba(229,57,53,0.3);
    border-color: #e53935;
    color: #ef5350;
}

.re-cmd-add-row {
    position: relative;
    display: flex;
    gap: 4px;
}

.re-cmd-add-row .re-cmd-search {
    flex: 1;
    min-width: 0;
}

.re-cmd-add-btn {
    background: #5c6bc0;
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    padding: 0 8px;
    flex-shrink: 0;
}

.re-cmd-add-btn:hover {
    background: #7986cb;
}

.re-cmd-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: #222240;
    border: 1px solid #444;
    border-radius: 4px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.re-cmd-select-item {
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
    color: #b0bec5;
    border-bottom: 1px solid #333;
}

.re-cmd-select-item:hover {
    background: rgba(92,107,192,0.15);
}

.re-cmd-select-item:last-child {
    border-bottom: none;
}
