/* Reset e variáveis */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3498db;
    --success-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --python-color: #3776ab;
    --bg-dark: #1e1e1e;
    --bg-medium: #252526;
    --bg-light: #2d2d30;
    --bg-lighter: #3e3e42;
    --text-color: #cccccc;
    --text-light: #ffffff;
    --border-color: #3e3e42;
    --sidebar-width: 280px;
    --code-panel-width: 450px;
    --header-height: 42px;

    /* Accessibility - Focus indicators */
    --focus-ring-color: #6366f1;
    --focus-ring-offset: 2px;
    --focus-ring-width: 2px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background: var(--bg-dark);
    overflow: hidden;
}

/* ========================================
   ACCESSIBILITY - Focus Indicators
   Provides visible focus for keyboard navigation
   ======================================== */

/* Global focus-visible styles for all interactive elements */
:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
}

/* Remove default outline only when focus-visible is supported */
:focus:not(:focus-visible) {
    outline: none;
}

/* Enhanced focus for form inputs */
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

/* Links focus style */
a:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
    border-radius: 2px;
}

/* Skip link for screen readers - hidden but focusable */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--focus-ring-color);
    color: white;
    padding: 8px 16px;
    z-index: 10000;
    text-decoration: none;
    font-weight: 600;
    border-radius: 0 0 4px 0;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* ========================================
   HEADER - BARRA SUPERIOR COMPACTA
   ======================================== */

.header {
    height: 42px;
    min-height: 42px;
    background: #252525;
    color: var(--text-light);
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 6px;
    border-bottom: 1px solid #333;
    position: relative;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Logo e Branding */
.header-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 12px;
    border-right: 1px solid #444;
    margin-right: 4px;
}

.logo-container {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(52, 152, 219, 0.15);
    border-radius: 6px;
}

.logo-container i {
    font-size: 14px;
    color: var(--primary-color);
}

.brand-text h1 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Navigation Menu */
.header-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1px;
}

.nav-btn {
    background: transparent;
    border: none;
    color: #888;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ccc;
}

.menu-dropdown.open .nav-btn {
    background: rgba(52, 152, 219, 0.15);
    color: var(--primary-color);
}

/* Header Center - Project Name */
.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0 16px;
}

.project-name-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid #333;
    border-radius: 4px;
    padding: 5px 12px;
    transition: all 0.15s ease;
}

.project-name-wrapper:hover,
.project-name-wrapper:focus-within {
    background: rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.project-name-wrapper i {
    color: #666;
    font-size: 12px;
}

.project-name-wrapper:focus-within i {
    color: var(--primary-color);
}

.project-name-wrapper input {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 12px;
    font-weight: 500;
    width: 180px;
}

.project-name-wrapper input:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
}

.project-name-wrapper input::placeholder {
    color: #555;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    border-left: 1px solid #444;
    margin-left: 6px;
}

.action-btn-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 12px;
}

.action-btn-icon:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #aaa;
}

.action-btn-icon.btn-validate {
    color: #f39c12;
}

.action-btn-icon.btn-validate:hover {
    background: rgba(243, 156, 18, 0.15);
    color: #f39c12;
}

.action-btn-icon.btn-share {
    color: #9b59b6;
}

.action-btn-icon.btn-share:hover {
    background: rgba(155, 89, 182, 0.15);
    color: #a569bd;
}

.action-btn-primary {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: rgba(46, 204, 113, 0.15);
    border: none;
    border-radius: 4px;
    color: #2ecc71;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.action-btn-primary:hover {
    background: rgba(46, 204, 113, 0.25);
    color: #58d68d;
}

.action-btn-primary i {
    font-size: 10px;
}

.action-btn-danger {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: rgba(231, 76, 60, 0.15);
    border: none;
    border-radius: 4px;
    color: #e74c3c;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.action-btn-danger:hover {
    background: rgba(231, 76, 60, 0.25);
    color: #ec7063;
}

.action-btn-danger i {
    font-size: 10px;
}

/* Header User */
.header-user {
    padding-left: 10px;
    border-left: 1px solid #444;
    margin-left: 6px;
}

.user-avatar-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(52, 152, 219, 0.15);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.15s ease;
    overflow: hidden;
}

.user-avatar-btn:hover {
    background: rgba(52, 152, 219, 0.25);
}

.user-avatar-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar-btn i {
    font-size: 14px;
    color: var(--primary-color);
}

.user-info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid #333;
}

.user-info-header i {
    font-size: 32px;
    color: var(--primary-color);
}

.user-name-display {
    display: block;
    font-weight: 600;
    color: var(--text-light);
    font-size: 13px;
}

.user-email-display {
    display: block;
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

/* Botões */
.btn {
    padding: 9px 16px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: var(--text-light);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.btn i {
    position: relative;
    z-index: 1;
}

.btn span {
    position: relative;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2980b9 100%);
    border-color: rgba(52,152,219,0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, var(--primary-color) 100%);
    box-shadow: 0 8px 20px rgba(52,152,219,0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #27ae60 100%);
    border-color: rgba(46,204,113,0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #27ae60 0%, var(--success-color) 100%);
    box-shadow: 0 8px 20px rgba(46,204,113,0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: rgba(245,158,11,0.3);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    box-shadow: 0 8px 20px rgba(245,158,11,0.4);
}

.btn-close, .icon-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-color);
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-close:hover, .icon-btn:hover {
    background: var(--bg-lighter);
    color: var(--text-light);
}

/* Main Content */
.main-content {
    display: flex;
    height: calc(100vh - var(--header-height));
}

/* ========================================
   SIDEBAR - NÓS DISPONÍVEIS (NOVO DESIGN)
   ======================================== */

.sidebar {
    width: var(--sidebar-width);
    background: #1a1a1a;
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 36px;
    min-height: 36px;
    padding: 0 12px;
    background: #252525;
    border-bottom: 1px solid #333;
}

.sidebar-header h3 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-header h3 i {
    color: var(--primary-color);
    font-size: 14px;
}

.node-count {
    font-size: 10px;
    color: #888;
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Search Box - Estilo Console */
.search-box {
    padding: 8px 12px;
    background: #1e1e1e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-box i {
    color: #666;
    font-size: 12px;
}

.search-box input {
    flex: 1;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 6px 10px;
    color: var(--text-color);
    font-size: 12px;
    transition: border-color 0.2s;
}

.search-box input:focus {
    border-color: var(--primary-color);
}

.search-box input:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
}

.search-box input::placeholder {
    color: #666;
}

/* Nodes List Container */
.nodes-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    background: #1a1a1a;
}

/* Node Category - Estilo Colapsável */
.node-category {
    margin-bottom: 4px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
    overflow: hidden;
}

.node-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid transparent;
    user-select: none;
}

.node-category-header:hover {
    background: rgba(255, 255, 255, 0.06);
}

.node-category-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.node-category-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(52, 152, 219, 0.15);
    border-radius: 4px;
    color: var(--primary-color);
    font-size: 11px;
}

.node-category-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-color);
    letter-spacing: 0.3px;
}

.node-category-count {
    font-size: 10px;
    color: #666;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
}

.node-category-toggle {
    color: #666;
    font-size: 10px;
    transition: transform 0.2s ease;
}

.node-category.collapsed .node-category-toggle {
    transform: rotate(-90deg);
}

.node-category.collapsed .node-category-items {
    display: none;
}

.node-category-items {
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

/* Node Item - Design Compacto e Moderno */
.node-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    cursor: grab;
    transition: all 0.15s ease;
    gap: 10px;
    border: 1px solid transparent;
}

.node-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(52, 152, 219, 0.3);
}

.node-item:active {
    cursor: grabbing;
    background: rgba(52, 152, 219, 0.1);
}

.node-item-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(52, 152, 219, 0.15);
    border-radius: 6px;
    color: var(--primary-color);
    font-size: 12px;
    flex-shrink: 0;
}

.node-item-content {
    flex: 1;
    min-width: 0;
}

.node-item-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
}

.node-item-name {
    font-weight: 500;
    font-size: 12px;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.node-item-desc {
    font-size: 10px;
    color: #666;
    margin-top: 2px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.node-item-drag {
    color: #444;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.node-item:hover .node-item-drag {
    opacity: 1;
}

/* Cores das categorias */
.node-category[data-category="basic"] .node-category-icon,
.node-category[data-category="basic"] .node-item-icon {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
}

.node-category[data-category="logic"] .node-category-icon,
.node-category[data-category="logic"] .node-item-icon {
    background: rgba(155, 89, 182, 0.15);
    color: #9b59b6;
}

.node-category[data-category="data"] .node-category-icon,
.node-category[data-category="data"] .node-item-icon {
    background: rgba(52, 152, 219, 0.15);
    color: #3498db;
}

.node-category[data-category="http"] .node-category-icon,
.node-category[data-category="http"] .node-item-icon {
    background: rgba(230, 126, 34, 0.15);
    color: #e67e22;
}

.node-category[data-category="database"] .node-category-icon,
.node-category[data-category="database"] .node-item-icon {
    background: rgba(241, 196, 15, 0.15);
    color: #f1c40f;
}

.node-category[data-category="file"] .node-category-icon,
.node-category[data-category="file"] .node-item-icon {
    background: rgba(26, 188, 156, 0.15);
    color: #1abc9c;
}

.node-category[data-category="python"] .node-category-icon,
.node-category[data-category="python"] .node-item-icon {
    background: rgba(55, 118, 171, 0.15);
    color: #3776ab;
}

.node-category[data-category="google"] .node-category-icon,
.node-category[data-category="google"] .node-item-icon {
    background: rgba(66, 133, 244, 0.15);
    color: #4285f4;
}

.node-category[data-category="automation"] .node-category-icon,
.node-category[data-category="automation"] .node-item-icon {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}

.node-category[data-category="triggers"] .node-category-icon,
.node-category[data-category="triggers"] .node-item-icon {
    background: rgba(241, 196, 15, 0.15);
    color: #f1c40f;
}

.node-category[data-category="interface"] .node-category-icon,
.node-category[data-category="interface"] .node-item-icon {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.node-category[data-category="ai"] .node-category-icon,
.node-category[data-category="ai"] .node-item-icon {
    background: rgba(236, 72, 153, 0.15);
    color: #ec4899;
}

.node-category[data-category="flow"] .node-category-icon,
.node-category[data-category="flow"] .node-item-icon {
    background: rgba(14, 165, 233, 0.15);
    color: #0ea5e9;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 8px;
    border-top: 1px solid #333;
    background: #1e1e1e;
}

.tips {
    display: flex;
    gap: 8px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    font-size: 10px;
    line-height: 1.4;
    color: #888;
}

.tips i {
    color: var(--warning-color);
    font-size: 14px;
    flex-shrink: 0;
}

/* ========================================
   EDITOR CONTAINER - CANVAS CENTRAL
   ======================================== */

.editor-container {
    flex: 1;
    position: relative;
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
}

.editor-toolbar {
    display: flex;
    align-items: center;
    height: 36px;
    min-height: 36px;
    padding: 0 8px;
    background: #252525;
    border-bottom: 1px solid #333;
    gap: 4px;
}

.editor-toolbar .toolbar-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #888;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    font-size: 12px;
}

.editor-toolbar .toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ccc;
}

.editor-toolbar .toolbar-btn:active {
    background: rgba(255, 255, 255, 0.12);
}

.toolbar-separator {
    width: 1px;
    height: 18px;
    background: #444;
    margin: 0 4px;
}

.zoom-level {
    font-size: 11px;
    color: #666;
    margin-left: auto;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

#drawflow {
    flex: 1;
    width: 100%;
    position: relative;
    background: #1a1a1a;
    background-size: 25px 25px;
    background-image:
        radial-gradient(circle, #2a2a2a 1px, transparent 1px);
}

/* Guia visual inicial */
#drawflow:empty::before {
    content: "Arraste nós da sidebar para começar\A\AConecte os nós:\A• Clique e arraste do ponto AZUL (saída)\A• Para o ponto VERDE (entrada)";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #444;
    font-size: 14px;
    text-align: center;
    white-space: pre-line;
    line-height: 1.8;
    pointer-events: none;
    font-weight: 500;
}

/* ========================================
   CODE PANEL - PAINEL DE PROPRIEDADES
   ======================================== */

.code-panel {
    width: var(--code-panel-width);
    background: #1a1a1a;
    border-left: 1px solid #333;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
}

.code-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 36px;
    min-height: 36px;
    padding: 0 12px;
    background: #252525;
    border-bottom: 1px solid #333;
}

.code-panel-header h3 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.code-panel-header h3 i {
    color: var(--primary-color);
    font-size: 14px;
}

.code-panel-actions {
    display: flex;
    gap: 2px;
}

.code-panel-actions .icon-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    padding: 0;
    font-size: 12px;
}

.code-panel-actions .icon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #aaa;
}

.properties-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background: #1a1a1a;
}

.no-selection {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #666;
    padding: 30px;
    text-align: center;
}

.no-selection i {
    font-size: 36px;
    color: #444;
    opacity: 0.5;
}

.no-selection p {
    font-size: 13px;
    margin: 0;
    color: #888;
}

.no-selection small {
    font-size: 11px;
    color: #555;
}

/* Property Groups */
.property-group {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.property-group:last-child {
    border-bottom: none;
}

.property-label {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    margin-bottom: 6px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.property-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #333;
    border-radius: 4px;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-light);
    transition: border-color 0.2s ease;
}

.property-input:focus {
    border-color: var(--primary-color);
    background: rgba(0, 0, 0, 0.3);
}

.property-input:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
}

.property-input::placeholder {
    color: #555;
}

/* Monaco Editor Container */
.monaco-editor-container {
    flex: 1;
    position: relative;
    min-height: 400px;
    background: #1e1e1e;
}

/* ========================================
   CONSOLE DE EXECUÇÃO - DESIGN COMPACTO
   ======================================== */

.execution-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 280px;
    background: #1a1a1a;
    border-top: 1px solid #333;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
    transition: height 0.2s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.execution-panel.collapsed {
    height: 36px;
}

.execution-panel.collapsed .execution-content {
    display: none;
}

.execution-panel.open {
    bottom: 0;
}

/* Toolbar unificada */
.execution-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 36px;
    min-height: 36px;
    padding: 0 8px;
    background: #252525;
    border-bottom: 1px solid #333;
}

.execution-toolbar-left {
    display: flex;
    align-items: center;
    gap: 2px;
}

.execution-toolbar-right {
    display: flex;
    align-items: center;
    gap: 2px;
}

/* Tabs compactas */
.execution-toolbar .tab-btn {
    padding: 6px 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    color: #666;
    border-radius: 4px;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.execution-toolbar .tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #aaa;
}

.execution-toolbar .tab-btn.active {
    background: rgba(52, 152, 219, 0.15);
    color: var(--primary-color);
}

.execution-toolbar .tab-btn i {
    font-size: 10px;
}

/* Botões da toolbar de execução */
.execution-toolbar-right .toolbar-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #555;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.execution-toolbar-right .toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #aaa;
}

.execution-toolbar-right .toolbar-btn i {
    font-size: 11px;
}

/* Área de conteúdo */
.execution-content {
    flex: 1;
    overflow: hidden;
    background: #1a1a1a;
}

.tab-content {
    display: none;
    padding: 0;
    height: 100%;
    overflow: auto;
}

.tab-content.active {
    display: block;
}

.tab-content pre {
    margin: 0;
    padding: 12px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #ccc;
}

/* Handle de resize */
.resize-handle-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    cursor: ns-resize;
    background: transparent;
    transition: background 0.15s ease;
}

.resize-handle-top:hover {
    background: rgba(52, 152, 219, 0.4);
}

/* Handles de resize laterais */
.resize-handle-left,
.resize-handle-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    cursor: ew-resize;
    background: transparent;
    transition: background 0.15s ease;
}

.resize-handle-left {
    left: 0;
}

.resize-handle-right {
    right: 0;
}

.resize-handle-left:hover,
.resize-handle-right:hover {
    background: rgba(52, 152, 219, 0.4);
}

/* ========================================
   MODAIS - DESIGN PADRONIZADO
   ======================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal.open {
    display: flex;
    animation: modalFadeIn 0.15s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 6px;
    width: 600px;
    max-width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
    animation: modalSlideIn 0.2s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 42px;
    min-height: 42px;
    padding: 0 16px;
    background: #252525;
    border-bottom: 1px solid #333;
    border-radius: 6px 6px 0 0;
}

.modal-header h2,
.modal-header h3 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.modal-header h2 i,
.modal-header h3 i {
    color: var(--primary-color);
    font-size: 14px;
}

.modal-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s ease;
    padding: 0;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #aaa;
}

.modal-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
    background: #1a1a1a;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #1e1e1e;
    border-top: 1px solid #333;
    border-radius: 0 0 6px 6px;
}

.flow-item {
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-dark);
}

.flow-item:hover {
    border-color: var(--primary-color);
    background: var(--bg-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.flow-item-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-light);
}

.flow-item-desc {
    font-size: 12px;
    color: #888;
    margin-top: 6px;
}

/* Modal Fullscreen */
.modal-fullscreen {
    padding: 0;
}

.modal-content-fullscreen {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
}

/* Drawflow Node Styles */
.drawflow .drawflow-node {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid #764ba2;
    border-radius: 10px;
    padding: 0;
    min-width: 220px;
    max-width: 300px;
    color: white;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    overflow: visible;
}

.drawflow .drawflow-node.selected {
    border-color: var(--success-color);
    box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.4), 0 6px 20px rgba(0,0,0,0.4);
}

/* ========================================
   Cores por Categoria - Nós no Canvas
   ======================================== */

/* Basic - Verde (#2ecc71) */
.drawflow .drawflow-node.category-basic {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    border-color: #27ae60;
}
.drawflow .drawflow-node.category-basic.selected {
    box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.5), 0 6px 20px rgba(0,0,0,0.4);
}

/* Logic - Roxo (#9b59b6) */
.drawflow .drawflow-node.category-logic {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    border-color: #8e44ad;
}
.drawflow .drawflow-node.category-logic.selected {
    box-shadow: 0 0 0 4px rgba(155, 89, 182, 0.5), 0 6px 20px rgba(0,0,0,0.4);
}

/* Data - Azul (#3498db) */
.drawflow .drawflow-node.category-data {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-color: #2980b9;
}
.drawflow .drawflow-node.category-data.selected {
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.5), 0 6px 20px rgba(0,0,0,0.4);
}

/* HTTP - Laranja (#e67e22) */
.drawflow .drawflow-node.category-http {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    border-color: #d35400;
}
.drawflow .drawflow-node.category-http.selected {
    box-shadow: 0 0 0 4px rgba(230, 126, 34, 0.5), 0 6px 20px rgba(0,0,0,0.4);
}

/* Database - Amarelo/Dourado (#f1c40f) */
.drawflow .drawflow-node.category-database {
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
    border-color: #f39c12;
    color: #333;
}
.drawflow .drawflow-node.category-database .title-box,
.drawflow .drawflow-node.category-database .input-label,
.drawflow .drawflow-node.category-database .output-label {
    color: #333;
}
.drawflow .drawflow-node.category-database.selected {
    box-shadow: 0 0 0 4px rgba(241, 196, 15, 0.5), 0 6px 20px rgba(0,0,0,0.4);
}

/* File - Turquesa (#1abc9c) */
.drawflow .drawflow-node.category-file {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    border-color: #16a085;
}
.drawflow .drawflow-node.category-file.selected {
    box-shadow: 0 0 0 4px rgba(26, 188, 156, 0.5), 0 6px 20px rgba(0,0,0,0.4);
}

/* Python - Azul Python (#3776ab) */
.drawflow .drawflow-node.category-python {
    background: linear-gradient(135deg, #3776ab 0%, #2c5f87 100%);
    border-color: #2c5f87;
}
.drawflow .drawflow-node.category-python.selected {
    box-shadow: 0 0 0 4px rgba(55, 118, 171, 0.5), 0 6px 20px rgba(0,0,0,0.4);
}

/* Google - Azul Google (#4285f4) */
.drawflow .drawflow-node.category-google {
    background: linear-gradient(135deg, #4285f4 0%, #3367d6 100%);
    border-color: #3367d6;
}
.drawflow .drawflow-node.category-google.selected {
    box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.5), 0 6px 20px rgba(0,0,0,0.4);
}

/* Automation - Vermelho (#e74c3c) */
.drawflow .drawflow-node.category-automation {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border-color: #c0392b;
}
.drawflow .drawflow-node.category-automation.selected {
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.5), 0 6px 20px rgba(0,0,0,0.4);
}

/* Triggers - Amarelo/Dourado (#f1c40f) */
.drawflow .drawflow-node.category-triggers {
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
    border-color: #f39c12;
    color: #333;
}
.drawflow .drawflow-node.category-triggers .title-box,
.drawflow .drawflow-node.category-triggers .input-label,
.drawflow .drawflow-node.category-triggers .output-label {
    color: #333;
}
.drawflow .drawflow-node.category-triggers.selected {
    box-shadow: 0 0 0 4px rgba(241, 196, 15, 0.5), 0 6px 20px rgba(0,0,0,0.4);
}

/* Interface - Indigo (#8b5cf6) */
.drawflow .drawflow-node.category-interface {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border-color: #7c3aed;
}
.drawflow .drawflow-node.category-interface.selected {
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.5), 0 6px 20px rgba(0,0,0,0.4);
}

/* AI - Rosa (#ec4899) */
.drawflow .drawflow-node.category-ai {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    border-color: #db2777;
}
.drawflow .drawflow-node.category-ai.selected {
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.5), 0 6px 20px rgba(0,0,0,0.4);
}

/* Flow - Azul Céu (#0ea5e9) */
.drawflow .drawflow-node.category-flow {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    border-color: #0284c7;
}
.drawflow .drawflow-node.category-flow.selected {
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.5), 0 6px 20px rgba(0,0,0,0.4);
}

/* Security - Cinza Escuro (#64748b) */
.drawflow .drawflow-node.category-security {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    border-color: #475569;
}
.drawflow .drawflow-node.category-security.selected {
    box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.5), 0 6px 20px rgba(0,0,0,0.4);
}

/* ======================================== */

.drawflow .drawflow-node .title-box {
    font-weight: 600;
    font-size: 14px;
    padding: 12px 16px;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px 8px 0 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.drawflow .drawflow-node .node-icon {
    font-size: 16px;
    margin-right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
}

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

/* Estilos para edição inline de títulos de nós */
.drawflow .drawflow-node .node-title-text {
    display: inline-block;
    min-width: 50px;
    border-radius: 4px;
    transition: all 0.2s ease;
    user-select: text;
}

.drawflow .drawflow-node .node-title-text:hover {
    background-color: rgba(255, 255, 255, 0.05);
    cursor: text;
}

.drawflow .drawflow-node .node-title-text[contenteditable="true"] {
    background-color: #2d2d2d !important;
    padding: 2px 6px !important;
    border-radius: 3px !important;
    outline: 2px solid var(--primary-color) !important;
}

.drawflow .drawflow-node .node-save-status {
    font-size: 10px;
    margin-left: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: inline-block;
    font-weight: bold;
}

.drawflow .drawflow-node .node-inputs,
.drawflow .drawflow-node .node-outputs {
    padding: 8px 0;
}

.drawflow .drawflow-node .input-row,
.drawflow .drawflow-node .output-row {
    padding: 8px 16px;
    font-size: 12px;
    display: flex;
    align-items: center;
    position: relative;
    color: rgba(255,255,255,0.95);
}

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

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

.drawflow .drawflow-node .input-label,
.drawflow .drawflow-node .output-label {
    font-weight: 500;
}

/* Pontos de conexão - Inputs (esquerda) */
.drawflow .drawflow-node .input {
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: #2ecc71;
    border: 3px solid #27ae60;
    border-radius: 50%;
    cursor: crosshair;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.5);
    transition: all 0.2s;
}

.drawflow .drawflow-node .input:hover {
    background: #27ae60;
    transform: translateY(-50%) scale(1.3);
    box-shadow: 0 3px 12px rgba(46, 204, 113, 0.8);
}

/* Tooltip nos pontos de conexão */
.drawflow .drawflow-node .input::before,
.drawflow .drawflow-node .output::before {
    content: attr(title);
    position: absolute;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10000;
}

.drawflow .drawflow-node .input::before {
    right: 100%;
    margin-right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.drawflow .drawflow-node .output::before {
    left: 100%;
    margin-left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.drawflow .drawflow-node .input:hover::before,
.drawflow .drawflow-node .output:hover::before {
    opacity: 1;
}

/* Pontos de conexão - Outputs (direita) */
.drawflow .drawflow-node .output {
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: #3498db;
    border: 3px solid #2980b9;
    border-radius: 50%;
    cursor: crosshair;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.5);
    transition: all 0.2s;
}

.drawflow .drawflow-node .output:hover {
    background: #2980b9;
    transform: translateY(-50%) scale(1.3);
    box-shadow: 0 3px 12px rgba(52, 152, 219, 0.8);
}

/* Posicionamento individual de múltiplos inputs/outputs */
.drawflow .drawflow-node .input_1 {
    top: calc(40px + 8px + 18px); /* title + padding + metade da primeira row */
}

.drawflow .drawflow-node .input_2 {
    top: calc(40px + 8px + 18px + 36px); /* posição input_1 + altura de uma row */
}

.drawflow .drawflow-node .input_3 {
    top: calc(40px + 8px + 18px + 72px); /* posição input_1 + altura de duas rows */
}

.drawflow .drawflow-node .output_1 {
    top: calc(40px + 8px + 18px); /* title + padding + metade da primeira row */
}

.drawflow .drawflow-node .output_2 {
    top: calc(40px + 8px + 18px + 36px); /* posição output_1 + altura de uma row */
}

.drawflow .drawflow-node .output_3 {
    top: calc(40px + 8px + 18px + 72px); /* posição output_1 + altura de duas rows */
}

/* Inputs/Outputs 4-10 - Suporte para nós com muitos inputs/outputs */
.drawflow .drawflow-node .input_4,
.drawflow .drawflow-node .output_4 {
    top: calc(40px + 8px + 18px + 108px); /* 4ª linha */
}

.drawflow .drawflow-node .input_5,
.drawflow .drawflow-node .output_5 {
    top: calc(40px + 8px + 18px + 144px); /* 5ª linha */
}

.drawflow .drawflow-node .input_6,
.drawflow .drawflow-node .output_6 {
    top: calc(40px + 8px + 18px + 180px); /* 6ª linha */
}

.drawflow .drawflow-node .input_7,
.drawflow .drawflow-node .output_7 {
    top: calc(40px + 8px + 18px + 216px); /* 7ª linha */
}

.drawflow .drawflow-node .input_8,
.drawflow .drawflow-node .output_8 {
    top: calc(40px + 8px + 18px + 252px); /* 8ª linha */
}

.drawflow .drawflow-node .input_9,
.drawflow .drawflow-node .output_9 {
    top: calc(40px + 8px + 18px + 288px); /* 9ª linha */
}

.drawflow .drawflow-node .input_10,
.drawflow .drawflow-node .output_10 {
    top: calc(40px + 8px + 18px + 324px); /* 10ª linha */
}

/* Ajustar transform para inputs/outputs específicos (já têm top definido) */
.drawflow .drawflow-node .input_1,
.drawflow .drawflow-node .input_2,
.drawflow .drawflow-node .input_3,
.drawflow .drawflow-node .input_4,
.drawflow .drawflow-node .input_5,
.drawflow .drawflow-node .input_6,
.drawflow .drawflow-node .input_7,
.drawflow .drawflow-node .input_8,
.drawflow .drawflow-node .input_9,
.drawflow .drawflow-node .input_10,
.drawflow .drawflow-node .output_1,
.drawflow .drawflow-node .output_2,
.drawflow .drawflow-node .output_3,
.drawflow .drawflow-node .output_4,
.drawflow .drawflow-node .output_5,
.drawflow .drawflow-node .output_6,
.drawflow .drawflow-node .output_7,
.drawflow .drawflow-node .output_8,
.drawflow .drawflow-node .output_9,
.drawflow .drawflow-node .output_10 {
    transform: none; /* Remove translateY porque top já está correto */
}

.drawflow .drawflow-node .input_1:hover,
.drawflow .drawflow-node .input_2:hover,
.drawflow .drawflow-node .input_3:hover,
.drawflow .drawflow-node .input_4:hover,
.drawflow .drawflow-node .input_5:hover,
.drawflow .drawflow-node .input_6:hover,
.drawflow .drawflow-node .input_7:hover,
.drawflow .drawflow-node .input_8:hover,
.drawflow .drawflow-node .input_9:hover,
.drawflow .drawflow-node .input_10:hover,
.drawflow .drawflow-node .output_1:hover,
.drawflow .drawflow-node .output_2:hover,
.drawflow .drawflow-node .output_3:hover,
.drawflow .drawflow-node .output_4:hover,
.drawflow .drawflow-node .output_5:hover,
.drawflow .drawflow-node .output_6:hover,
.drawflow .drawflow-node .output_7:hover,
.drawflow .drawflow-node .output_8:hover,
.drawflow .drawflow-node .output_9:hover,
.drawflow .drawflow-node .output_10:hover {
    transform: scale(1.3); /* Apenas scale no hover */
}

/* Conexões */
.drawflow .connection .main-path {
    stroke: var(--primary-color);
    stroke-width: 3px;
    stroke-linecap: round;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.drawflow .connection .main-path:hover {
    stroke: var(--success-color);
    stroke-width: 4px;
}

.drawflow .connection .point {
    fill: var(--primary-color);
    stroke: white;
    stroke-width: 2;
}

.drawflow .connection.node_in_node-1,
.drawflow .connection.node_out_node-1 {
    z-index: 1;
}

/* Indicador visual ao arrastar conexão */
.drawflow-delete {
    background: var(--danger-color) !important;
    border: 2px solid #c0392b !important;
    color: white !important;
    font-weight: bold;
}

/* Animação ao criar conexão */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* Animação de spinner para loading */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.drawflow .drawflow-node .input.active,
.drawflow .drawflow-node .output.active {
    animation: pulse 0.8s infinite;
}

/* Feedback visual durante conexão */
.drawflow.connecting {
    cursor: crosshair !important;
}

.drawflow.connecting .drawflow-node .output {
    background: #f39c12;
    border-color: #e67e22;
    box-shadow: 0 0 20px rgba(243, 156, 18, 0.8);
}

.drawflow.connecting .drawflow-node .input {
    background: #2ecc71;
    border-color: #27ae60;
    box-shadow: 0 0 20px rgba(46, 204, 113, 0.8);
    animation: pulse 1s infinite;
}

/* Linha sendo arrastada */
.drawflow .connection.selected .main-path {
    stroke: var(--warning-color);
    stroke-width: 4px;
    animation: dashAnimation 0.5s linear infinite;
}

@keyframes dashAnimation {
    to {
        stroke-dashoffset: -20;
    }
}

/* Nó vazio */
.drawflow .drawflow-node.empty {
    opacity: 0.6;
}

/* Tooltip para conexões */
.connection-tooltip {
    position: absolute;
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    pointer-events: none;
    z-index: 9999;
    white-space: nowrap;
}

/* Code Development Toolbar */
.code-toolbar {
    display: flex;
    gap: 8px;
    padding: 10px 15px;
    background: var(--bg-medium);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    align-items: center;
}

.toolbar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.toolbar-btn:hover {
    background: var(--bg-lighter);
    border-color: var(--primary-color);
    color: var(--text-light);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toolbar-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.toolbar-btn i {
    font-size: 14px;
}

.toolbar-btn span {
    font-weight: 500;
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    margin: 0 4px;
}

/* Modal Overlay (Alternativo) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
    animation: modalFadeIn 0.15s ease;
}

/* Modal Row - Campos de formulário */
.modal-row {
    margin-bottom: 16px;
}

.modal-row:last-child {
    margin-bottom: 0;
}

.modal-row label {
    display: block;
    margin-bottom: 6px;
    color: #888;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.modal-row input[type="text"],
.modal-row input[type="number"],
.modal-row input[type="email"],
.modal-row input[type="password"],
.modal-row input[type="url"],
.modal-row textarea,
.modal-row select {
    width: 100%;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid #333;
    border-radius: 4px;
    color: var(--text-light);
    font-size: 12px;
    font-family: inherit;
    transition: border-color 0.15s ease;
}

.modal-row input:focus,
.modal-row textarea:focus,
.modal-row select:focus {
    border-color: var(--primary-color);
}

.modal-row input:focus-visible,
.modal-row textarea:focus-visible,
.modal-row select:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
}

.modal-row input::placeholder,
.modal-row textarea::placeholder {
    color: #555;
}

.modal-row input[type="range"] {
    width: 100%;
    margin-bottom: 8px;
}

.modal-row input[type="number"] {
    width: 80px;
}

.range-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.range-display {
    min-width: 30px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(52, 152, 219, 0.15);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Modal Buttons */
.modal-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: all 0.15s ease;
}

.modal-btn-primary {
    background: rgba(52, 152, 219, 0.15);
    color: var(--primary-color);
}

.modal-btn-primary:hover {
    background: rgba(52, 152, 219, 0.25);
}

.modal-btn-success {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
}

.modal-btn-success:hover {
    background: rgba(46, 204, 113, 0.25);
}

.modal-btn-danger {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}

.modal-btn-danger:hover {
    background: rgba(231, 76, 60, 0.25);
}

.modal-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #888;
}

.modal-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #aaa;
}

/* Context Menu */
.context-menu {
    position: absolute;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px;
    min-width: 280px;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    animation: fadeInMenu 0.15s ease;
    max-height: 400px;
    overflow-y: auto;
}

@keyframes fadeInMenu {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.context-menu-item {
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s;
    margin-bottom: 2px;
}

.context-menu-item:hover {
    background: var(--bg-lighter);
}

.context-menu-item:last-child {
    margin-bottom: 0;
}

.context-menu-item {
    display: flex;
    align-items: center;
}

.context-menu-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.context-menu-item.delete {
    color: #e74c3c;
}

.context-menu-item.delete:hover {
    background: rgba(231, 76, 60, 0.15);
}

.context-menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 6px 0;
}

.snippet-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.snippet-item i {
    font-size: 16px;
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.snippet-info {
    flex: 1;
}

.snippet-info div:first-child {
    font-weight: bold;
    color: var(--text-light);
    font-size: 13px;
}

.snippet-info div:last-child {
    font-size: 11px;
    color: var(--text-color);
    margin-top: 2px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-lighter);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.node-item {
    animation: fadeIn 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .code-panel {
        width: 350px;
    }
}

/* ==================== EXECUTION MODAL ==================== */
.execution-mode-card {
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.execution-mode-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.execution-mode-card.active {
    border-color: var(--primary-color);
    background: rgba(0, 123, 255, 0.1);
}

.execution-mode-card.active .mode-check {
    display: flex;
}

/* Mode Card Header */
.mode-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mode-icon {
    font-size: 32px;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-medium);
    border-radius: 12px;
}

.mode-info {
    flex: 1;
}

.mode-info h3 {
    margin: 0 0 5px 0;
    color: var(--text-light);
    font-size: 18px;
    font-weight: 600;
}

.mode-info p {
    margin: 0;
    color: var(--text-color);
    font-size: 13px;
}

.mode-check {
    display: none;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    border-radius: 50%;
    color: white;
    font-size: 14px;
}

/* Config Section */
.execution-config {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.config-section {
    background: var(--bg-medium);
    padding: 20px;
    border-radius: 8px;
}

/* Cron Presets Grid */
.cron-presets-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.cron-preset {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 8px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.cron-preset:hover {
    border-color: var(--primary-color);
    background: rgba(0, 123, 255, 0.1);
}

.cron-preset code {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.cron-preset span {
    font-size: 10px;
    color: var(--text-color);
}

/* Next Executions */
.next-executions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.next-execution-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-dark);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-light);
}

.next-execution-item i {
    color: var(--primary-color);
}

/* Service Status Panel */
.service-status-panel {
    background: var(--bg-dark);
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
}

.service-status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.service-controls {
    display: flex;
    gap: 10px;
}

.status-badge-large {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--bg-medium);
    font-size: 13px;
    font-weight: 500;
}

.status-badge-large .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #888;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: var(--bg-medium);
    border-radius: 8px;
    text-align: center;
}

.stat-item i {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-light);
}

.stat-label {
    font-size: 11px;
    color: var(--text-color);
    margin-top: 4px;
}

/* Interval Presets */
.btn-mini {
    padding: 5px 10px;
    font-size: 11px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-mini:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Execution History Section */
.execution-history-section {
    margin-top: 25px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: var(--bg-light);
    cursor: pointer;
    transition: background 0.2s ease;
}

.history-header:hover {
    background: var(--bg-lighter);
}

.history-header h4 {
    margin: 0;
    font-size: 14px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-header i.fa-chevron-down {
    transition: transform 0.3s ease;
}

.history-header i.fa-chevron-down.rotated {
    transform: rotate(180deg);
}

#historyChevron.rotated {
    transform: rotate(180deg);
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
    background: var(--bg-medium);
}

.history-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
}

.history-item:last-child {
    border-bottom: none;
}

.history-status {
    font-size: 16px;
}

.history-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.history-date {
    font-size: 13px;
    color: var(--text-light);
}

.history-duration {
    font-size: 11px;
    color: var(--text-color);
}

.history-error {
    font-size: 11px;
    color: #f44336;
    margin-top: 4px;
    padding: 5px 8px;
    background: rgba(244, 67, 54, 0.1);
    border-radius: 4px;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Status Badge Colors */
.status-badge.status-manual {
    background: rgba(136, 136, 136, 0.2);
    color: #aaa;
}

.status-badge.status-scheduled {
    background: rgba(0, 123, 255, 0.2);
    color: var(--primary-color);
}

.status-badge.status-service {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-light);
    font-size: 13px;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-light);
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary-color);
}

.form-group input:focus-visible,
.form-group select:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
}

.cron-examples {
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 123, 255, 0.05);
    border-radius: 4px;
    font-size: 12px;
}

.cron-examples strong {
    display: block;
    margin-bottom: 5px;
    color: var(--text-light);
}

.cron-example {
    padding: 4px 0;
    color: var(--text-color);
}

.cron-example code {
    background: var(--bg-dark);
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 8px;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
}

.service-status {
    padding: 15px;
    background: rgba(76, 175, 80, 0.1);
    border-left: 3px solid #4caf50;
    border-radius: 4px;
    margin-top: 10px;
}

.service-status.stopped {
    background: rgba(244, 67, 54, 0.1);
    border-left-color: #f44336;
}

.service-status.error {
    background: rgba(255, 152, 0, 0.1);
    border-left-color: #ff9800;
}

.service-controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.service-controls .btn {
    flex: 1;
}

.execution-info {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    padding: 12px;
    background: var(--bg-dark);
    border-radius: 4px;
}

.info-item {
    flex: 1;
}

.info-item label {
    display: block;
    font-size: 11px;
    color: var(--text-color);
    margin-bottom: 4px;
    text-transform: uppercase;
}

.info-item span {
    display: block;
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.running {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.status-badge.stopped {
    background: rgba(158, 158, 158, 0.2);
    color: #9e9e9e;
}

.status-badge.error {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

/* ==================== WEBHOOK LOGS ==================== */

.method-badge {
    font-family: 'Courier New', monospace;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.method-badge.post,
.method-badge.method-post {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.method-badge.method-get {
    background: rgba(33, 150, 243, 0.2);
    color: #2196F3;
}

.method-badge.method-put {
    background: rgba(255, 152, 0, 0.2);
    color: #FF9800;
}

.method-badge.method-delete {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.status-badge-success {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    font-weight: 500;
}

.status-badge-error {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    font-weight: 500;
}

.stat-card {
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    border-left: 3px solid var(--border-color);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.webhook-log-entry code {
    background: var(--bg-primary);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
    color: var(--primary);
}

.webhook-log-entry pre {
    background: var(--bg-primary);
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
    color: var(--text-primary);
}

.webhook-log-entry details summary {
    transition: color 0.2s;
}

.webhook-log-entry details summary:hover {
    color: var(--primary-hover);
}

.webhook-log-entry details[open] summary {
    margin-bottom: 8px;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 0.9em;
}

/* ==================== RESIZABLE PANELS ==================== */

.resize-handle {
    position: absolute;
    background: transparent;
    z-index: 10;
    transition: background-color 0.2s;
}

/* Resize handles horizontais */
.resize-handle-right,
.resize-handle-left {
    top: 0;
    bottom: 0;
    width: 5px;
    cursor: ew-resize;
}

.resize-handle-right {
    right: 0;
}

.resize-handle-left {
    left: 0;
}

/* Resize handle vertical (topo) */
.resize-handle-top {
    left: 0;
    right: 0;
    top: 0;
    height: 5px;
    cursor: ns-resize;
}

.resize-handle:hover {
    background-color: var(--primary);
}

.resize-handle.resizing {
    background-color: var(--primary);
}

.sidebar {
    position: relative;
    transition: width 0.3s ease, min-width 0.3s ease;
}

.sidebar.collapsed {
    width: 50px !important;
    min-width: 50px !important;
}

.sidebar.collapsed .search-box,
.sidebar.collapsed .nodes-list,
.sidebar.collapsed .sidebar-footer,
.sidebar.collapsed .node-count,
.sidebar.collapsed h3 {
    display: none;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 10px;
}

.code-panel {
    position: relative;
    transition: width 0.3s ease, min-width 0.3s ease;
}

.code-panel.collapsed {
    width: 50px !important;
    min-width: 50px !important;
}

.code-panel.collapsed .properties-content,
.code-panel.collapsed h3,
.code-panel.collapsed #btnFormatCode,
.code-panel.collapsed #btnCodeTheme,
.code-panel.collapsed #btnFullscreen {
    display: none;
}

.code-panel.collapsed .code-panel-header {
    justify-content: center;
    padding: 10px;
}

.panel-toggle-btn {
    transition: transform 0.3s ease;
}

.collapsed .panel-toggle-btn i.fa-chevron-left {
    transform: rotate(180deg);
}

.collapsed .panel-toggle-btn i.fa-chevron-right {
    transform: rotate(180deg);
}

/* Execution Panel Collapsed State */
.execution-panel.collapsed {
    height: 36px !important;
    overflow: hidden;
}

.execution-panel.collapsed .execution-content {
    display: none;
}

.execution-panel.collapsed #btnToggleExecution i {
    transform: rotate(180deg);
}

/* ===================================
   Toast Notification System
   =================================== */

/* Container for all toasts */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

/* Individual toast */
.toast {
    min-width: 320px;
    max-width: 450px;
    background: var(--bg-medium);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid var(--primary-color);
}

/* Toast animation states */
.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.hide {
    opacity: 0;
    transform: translateX(400px) scale(0.8);
    max-height: 0;
    padding: 0 20px;
    margin: 0;
    overflow: hidden;
}

/* Toast icon container */
.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* Toast content */
.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.4;
}

.toast-message {
    font-size: 13px;
    color: var(--text-color);
    line-height: 1.4;
    word-wrap: break-word;
}

/* Toast close button */
.toast-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 18px;
    padding: 0;
    line-height: 1;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

/* Progress bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 0 8px;
    transition: width linear;
}

/* Toast types */
.toast.toast-success {
    border-left-color: var(--success-color);
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.1) 0%, var(--bg-medium) 50%);
}

.toast.toast-success .toast-icon {
    color: var(--success-color);
}

.toast.toast-success .toast-progress {
    background: var(--success-color);
}

.toast.toast-error {
    border-left-color: var(--danger-color);
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1) 0%, var(--bg-medium) 50%);
}

.toast.toast-error .toast-icon {
    color: var(--danger-color);
}

.toast.toast-error .toast-progress {
    background: var(--danger-color);
}

.toast.toast-warning {
    border-left-color: var(--warning-color);
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.1) 0%, var(--bg-medium) 50%);
}

.toast.toast-warning .toast-icon {
    color: var(--warning-color);
}

.toast.toast-warning .toast-progress {
    background: var(--warning-color);
}

.toast.toast-info {
    border-left-color: var(--info-color);
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, var(--bg-medium) 50%);
}

.toast.toast-info .toast-icon {
    color: var(--info-color);
}

.toast.toast-info .toast-progress {
    background: var(--info-color);
}

/* Toast on mobile */
@media (max-width: 768px) {
    .toast-container {
        top: 70px;
        right: 10px;
        left: 10px;
    }

    .toast {
        min-width: auto;
        width: 100%;
    }
}

/* ===============================
   Menu Dropdown - Gmail Style
   =============================== */

.menu-dropdown {
    position: relative;
}

.menu-content {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    min-width: 200px;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transform-origin: top left;
    transition: all 0.15s ease;
    z-index: 1000;
    overflow: hidden;
    padding: 4px;
}

.menu-content-right {
    left: auto;
    right: 0;
    transform-origin: top right;
}

.menu-dropdown.open .menu-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: #aaa;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 12px;
    border-radius: 4px;
    margin: 1px 0;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-light);
}

.menu-item i {
    width: 16px;
    text-align: center;
    font-size: 12px;
    color: #666;
    transition: color 0.15s ease;
}

.menu-item:hover i {
    color: var(--primary-color);
}

.menu-item .shortcut {
    margin-left: auto;
    font-size: 10px;
    color: #555;
    font-family: 'Monaco', 'Menlo', monospace;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 5px;
    border-radius: 3px;
}

.menu-divider {
    height: 1px;
    background: #333;
    margin: 4px 0;
}

.menu-item-danger {
    color: #e74c3c;
}

.menu-item-danger i {
    color: #e74c3c;
}

.menu-item-danger:hover {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}

.menu-item-danger:hover i {
    color: #e74c3c;
}

/* Menu Section Title */
.menu-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px 4px;
    font-size: 10px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.menu-section-title i {
    font-size: 9px;
}

/* Recent Projects List */
.recent-projects-list {
    max-height: 160px;
    overflow-y: auto;
}

.recent-projects-list::-webkit-scrollbar {
    width: 4px;
}

.recent-projects-list::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 2px;
}

.menu-item-empty {
    padding: 10px 12px;
    font-size: 11px;
    color: #555;
    font-style: italic;
    text-align: center;
}

.menu-item-recent {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    color: #aaa;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 12px;
    border-radius: 4px;
    margin: 1px 0;
}

.menu-item-recent:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-light);
}

.menu-item-recent i {
    font-size: 11px;
    color: #666;
}

.menu-item-recent:hover i {
    color: var(--primary-color);
}

.menu-item-recent .project-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-item-recent .project-date {
    font-size: 9px;
    color: #555;
}

.menu-item-secondary {
    color: #888;
    font-size: 11px;
}

.menu-item-secondary:hover {
    color: var(--text-light);
}

.menu-item-secondary i {
    font-size: 11px;
}

/* ========================================
   MENU EXECUTAR - ESTILOS
   ======================================== */

.execution-mode-item {
    position: relative;
}

.execution-mode-item .mode-indicator {
    margin-left: auto;
    color: var(--success-color);
    font-size: 12px;
    min-width: 20px;
    text-align: center;
}

.menu-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--text-secondary, #888);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.menu-section-title i {
    font-size: 11px;
}

.menu-item-info {
    padding: 8px 12px;
    background: rgba(52, 152, 219, 0.1);
    border-left: 3px solid var(--primary-color);
    margin: 4px 8px;
    border-radius: 0 4px 4px 0;
}

.scheduler-info-content {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary, #888);
    font-size: 12px;
}

.scheduler-info-content i {
    color: var(--primary-color);
}

/* ========================================
   MODAL DE AGENDAMENTO (CRON)
   ======================================== */

#scheduleConfigModal .modal-content,
#serviceConfigModal .modal-content {
    animation: modalSlideIn 0.2s ease;
}

.interval-presets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.interval-preset {
    padding: 10px 15px;
    background: var(--bg-medium);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    text-align: center;
}

.interval-preset:hover {
    background: var(--bg-lighter);
    border-color: var(--primary-color);
    color: var(--text-light);
}

.next-executions-list {
    background: var(--bg-medium);
    border-radius: 8px;
    padding: 10px;
    max-height: 150px;
    overflow-y: auto;
}

.next-execution-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px;
    color: var(--text-color);
}

.next-execution-item:last-child {
    border-bottom: none;
}

.next-execution-item i {
    color: var(--primary-color);
    font-size: 12px;
}

/* ========================================
   ABA DE LOGS - CONSOLE DE EXECUÇÃO
   ======================================== */

#logsTab.active {
    display: flex !important;
    flex-direction: column;
    height: 100%;
    padding: 0;
}

.logs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    background: #1e1e1e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    gap: 8px;
    flex-wrap: wrap;
    min-height: 32px;
}

.logs-filters {
    display: flex;
    gap: 2px;
}

.log-filter-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #666;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.log-filter-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #aaa;
}

.log-filter-btn.active {
    background: rgba(52, 152, 219, 0.15);
    border-color: transparent;
    color: var(--primary-color);
}

.log-filter-btn[data-level="info"].active {
    background: rgba(33, 150, 243, 0.15);
    color: #64b5f6;
}

.log-filter-btn[data-level="warning"].active {
    background: rgba(255, 152, 0, 0.15);
    color: #ffb74d;
}

.log-filter-btn[data-level="error"].active {
    background: rgba(244, 67, 54, 0.15);
    color: #ef5350;
}

.log-filter-btn[data-level="debug"].active {
    background: rgba(156, 39, 176, 0.15);
    color: #ba68c8;
}

.logs-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.logs-actions .icon-btn {
    width: 26px;
    height: 26px;
    padding: 0;
    font-size: 11px;
    background: transparent;
    border: none;
    color: #555;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.logs-actions .icon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #aaa;
}

.logs-search {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid #333;
    border-radius: 4px;
    padding: 4px 10px;
    color: var(--text-color);
    font-size: 11px;
    width: 160px;
    transition: border-color 0.2s ease;
}

.logs-search:focus {
    border-color: var(--primary-color);
}

.logs-search:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
}

.logs-search::placeholder {
    color: #555;
}

.logs-stats {
    display: flex;
    align-items: center;
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    gap: 12px;
    font-size: 10px;
}

.log-stat {
    color: #666;
    display: flex;
    align-items: center;
    gap: 4px;
}

.log-stat.info {
    color: #64b5f6;
}

.log-stat.warning {
    color: #ffb74d;
}

.log-stat.error {
    color: #ef5350;
}

.logs-container {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    background: #1a1a1a;
}

.logs-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    color: #666;
    text-align: center;
}

.logs-empty i {
    font-size: 28px;
    margin-bottom: 10px;
    opacity: 0.5;
}

.logs-empty p {
    font-size: 13px;
    margin-bottom: 4px;
    color: #888;
}

.logs-empty span {
    font-size: 11px;
    color: #555;
}

.log-entry {
    display: flex;
    align-items: flex-start;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.15s ease;
    gap: 10px;
    background: rgba(0, 0, 0, 0.1);
}

.log-entry:hover {
    background: rgba(255, 255, 255, 0.03);
}

.log-entry.hidden {
    display: none;
}

.log-entry.highlight {
    background: rgba(255, 235, 59, 0.15);
}

.log-time {
    color: #888;
    font-size: 11px;
    min-width: 65px;
    flex-shrink: 0;
}

.log-level {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    min-width: 55px;
    text-align: center;
}

.log-level.info {
    background: rgba(33, 150, 243, 0.2);
    color: #64b5f6;
}

.log-level.warning {
    background: rgba(255, 152, 0, 0.2);
    color: #ffb74d;
}

.log-level.error {
    background: rgba(244, 67, 54, 0.2);
    color: #ef5350;
}

.log-level.debug {
    background: rgba(156, 39, 176, 0.2);
    color: #ba68c8;
}

.log-level.success {
    background: rgba(76, 175, 80, 0.2);
    color: #81c784;
}

.log-node {
    color: var(--primary-color);
    font-size: 11px;
    min-width: 100px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.log-message {
    flex: 1;
    color: #e0e0e0;
    line-height: 1.5;
    word-break: break-word;
    white-space: pre-wrap;
    font-size: 12px;
}

.log-message .emoji {
    font-size: 13px;
    margin-right: 4px;
}

.log-message code {
    background: rgba(0, 0, 0, 0.3);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 11px;
    color: #f8f8f2;
}

.log-message .json-preview {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 10px;
    border-radius: 4px;
    margin-top: 6px;
    max-height: 150px;
    overflow: auto;
    font-size: 11px;
    color: #a8e6cf;
}

.log-copy-btn {
    opacity: 0;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    font-size: 11px;
    transition: opacity 0.2s, color 0.2s;
}

.log-entry:hover .log-copy-btn {
    opacity: 1;
}

.log-copy-btn:hover {
    color: var(--primary-color);
}

/* ========================================
   ABA DE WEBHOOK LOGS - CONSOLE DE EXECUÇÃO
   ======================================== */

#webhookLogsTab.active {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.webhook-logs-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    background: #1e1e1e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 32px;
}

.webhook-logs-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wh-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #888;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.wh-stat i {
    font-size: 10px;
}

.wh-stat.success {
    color: #81c784;
    background: rgba(76, 175, 80, 0.15);
}

.wh-stat.error {
    color: #ef5350;
    background: rgba(244, 67, 54, 0.15);
}

.webhook-logs-actions {
    display: flex;
    gap: 2px;
}

.webhook-logs-actions .icon-btn {
    width: 26px;
    height: 26px;
    padding: 0;
    font-size: 11px;
    background: transparent;
    border: none;
    color: #555;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.webhook-logs-actions .icon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #aaa;
}

.webhook-logs-container {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    background: #1a1a1a;
}

.webhook-logs-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 120px;
    color: #666;
    text-align: center;
}

.webhook-logs-empty i {
    font-size: 28px;
    margin-bottom: 10px;
    opacity: 0.5;
}

.webhook-logs-empty p {
    margin: 0 0 4px 0;
    font-size: 13px;
    color: #888;
}

.webhook-logs-empty span {
    font-size: 11px;
    color: #666;
}

/* Webhook Log Entry - Compact Design */
.wh-log-entry {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
    margin-bottom: 4px;
    gap: 10px;
    font-size: 12px;
    transition: background 0.15s ease;
    cursor: pointer;
}

.wh-log-entry:hover {
    background: rgba(255, 255, 255, 0.05);
}

.wh-log-entry.expanded {
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.04);
}

.wh-log-method {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    min-width: 40px;
    text-align: center;
    text-transform: uppercase;
}

.wh-log-method.get {
    background: rgba(33, 150, 243, 0.2);
    color: #64b5f6;
}

.wh-log-method.post {
    background: rgba(76, 175, 80, 0.2);
    color: #81c784;
}

.wh-log-method.put {
    background: rgba(255, 152, 0, 0.2);
    color: #ffb74d;
}

.wh-log-method.delete {
    background: rgba(244, 67, 54, 0.2);
    color: #ef5350;
}

.wh-log-method.patch {
    background: rgba(156, 39, 176, 0.2);
    color: #ba68c8;
}

.wh-log-status {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
}

.wh-log-status.success {
    background: rgba(76, 175, 80, 0.15);
    color: #81c784;
}

.wh-log-status.error {
    background: rgba(244, 67, 54, 0.15);
    color: #ef5350;
}

.wh-log-time {
    color: #666;
    font-size: 11px;
    min-width: 70px;
}

.wh-log-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #888;
    font-size: 11px;
    overflow: hidden;
}

.wh-log-info code {
    background: rgba(0, 0, 0, 0.3);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10px;
    color: #aaa;
}

.wh-log-duration {
    color: #666;
    font-size: 10px;
    min-width: 45px;
    text-align: right;
}

.wh-log-expand {
    color: #555;
    font-size: 10px;
    transition: transform 0.2s;
}

.wh-log-entry.expanded .wh-log-expand {
    transform: rotate(180deg);
}

/* Webhook Log Details */
.wh-log-details {
    width: 100%;
    padding: 10px 0 4px 0;
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: none;
}

.wh-log-entry.expanded .wh-log-details {
    display: block;
}

.wh-log-detail-section {
    margin-bottom: 8px;
}

.wh-log-detail-section:last-child {
    margin-bottom: 0;
}

.wh-log-detail-label {
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.wh-log-detail-content {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 11px;
    color: #a8e6cf;
    max-height: 120px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.wh-log-error-msg {
    background: rgba(244, 67, 54, 0.1);
    border-left: 2px solid #ef5350;
    padding: 6px 10px;
    border-radius: 0 4px 4px 0;
    color: #ef5350;
    font-size: 11px;
    margin-top: 6px;
}

/* ========================================
   ABA DE VARIÁVEIS - CONSOLE DE EXECUÇÃO
   ======================================== */

#variablesTab.active {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.variables-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    background: #1e1e1e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    gap: 8px;
    min-height: 32px;
}

.variables-search {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid #333;
    border-radius: 4px;
    padding: 4px 10px;
    flex: 1;
    max-width: 250px;
    transition: border-color 0.2s ease;
}

.variables-search:focus-within {
    border-color: var(--primary-color);
}

.variables-search i {
    color: #555;
    font-size: 11px;
    margin-right: 8px;
}

.variables-search input {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 12px;
    width: 100%;
}

.variables-search input:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
}

.variables-search input::placeholder {
    color: #555;
}

.variables-actions {
    display: flex;
    gap: 2px;
}

.variables-actions .icon-btn {
    width: 26px;
    height: 26px;
    padding: 0;
    font-size: 11px;
    background: transparent;
    border: none;
    color: #555;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.variables-actions .icon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #aaa;
}

.variables-container {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    background: #1a1a1a;
}

.variables-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    color: #666;
    text-align: center;
}

.variables-empty i {
    font-size: 28px;
    margin-bottom: 10px;
    opacity: 0.5;
}

.variables-empty p {
    font-size: 13px;
    margin-bottom: 4px;
    color: #888;
}

.variables-empty span {
    font-size: 11px;
    color: #555;
}

.variables-list {
    padding: 8px 0;
}

.variable-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.variable-item:last-child {
    border-bottom: none;
}

.variable-item.nested {
    margin-left: 20px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
}

.variable-row {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    gap: 10px;
    transition: background 0.15s ease;
}

.variable-item.expandable > .variable-row {
    cursor: pointer;
}

.variable-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.variable-item.expandable > .variable-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.expand-icon {
    font-size: 10px;
    color: var(--text-secondary, #888);
    width: 14px;
    transition: transform 0.2s ease;
}

.variable-key {
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 13px;
    color: #e06c75;
    font-weight: 500;
    min-width: 80px;
}

.variable-type {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    white-space: nowrap;
}

.variable-type i {
    margin-right: 4px;
    font-size: 10px;
}

.variable-value {
    flex: 1;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 13px;
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.variable-value.empty {
    color: var(--text-secondary, #888);
    font-style: italic;
}

.variable-preview {
    flex: 1;
    font-size: 12px;
    color: var(--text-secondary, #888);
    font-style: italic;
}

.variable-copy-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary, #888);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    opacity: 0;
    transition: all 0.15s ease;
}

.variable-row:hover .variable-copy-btn {
    opacity: 1;
}

.variable-copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.variable-children {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 0 0 4px 4px;
}

/* Cores de valores por tipo */
.string-value {
    color: #98c379;
}

.number-value {
    color: #d19a66;
}

.boolean-value {
    color: #56b6c2;
}

.null-value,
.undefined-value {
    color: #abb2bf;
    font-style: italic;
}

/* ========================================
   MODAL DE ATALHOS DE TECLADO
   ======================================== */

/* Modal de Atalhos - Padronizado */
.shortcuts-modal-content {
    max-width: 900px;
    width: 95%;
}

.shortcuts-modal-body {
    padding: 16px;
    max-height: 70vh;
    overflow-y: auto;
}

.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 900px) {
    .shortcuts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .shortcuts-grid {
        grid-template-columns: 1fr;
    }
}

.shortcuts-category {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid #333;
    border-radius: 6px;
    padding: 12px;
    transition: all 0.15s ease;
}

.shortcuts-category:hover {
    border-color: rgba(52, 152, 219, 0.3);
}

.shortcuts-category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #333;
}

.shortcuts-category-header i {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(52, 152, 219, 0.15);
    border-radius: 4px;
    color: var(--primary-color);
    font-size: 11px;
}

.shortcuts-category-header span {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.shortcut-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.15s ease;
}

.shortcut-item:last-child {
    border-bottom: none;
}

.shortcut-item:hover {
    background: rgba(255, 255, 255, 0.03);
    margin: 0 -8px;
    padding: 6px 8px;
    border-radius: 4px;
}

.shortcut-desc {
    font-size: 11px;
    color: #888;
}

.shortcut-keys {
    display: flex;
    align-items: center;
    gap: 3px;
}

.shortcut-keys span {
    color: #555;
    font-size: 10px;
}

.shortcut-keys kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 3px;
    color: #aaa;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
}

.shortcut-item:hover kbd {
    background: #333;
    border-color: var(--primary-color);
    color: var(--text-light);
}

.shortcuts-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #333;
}

.shortcuts-tip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.2);
    border-radius: 4px;
    color: #888;
    font-size: 11px;
}

.shortcuts-tip i {
    color: #2ecc71;
    font-size: 14px;
}

.shortcuts-tip kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid rgba(46, 204, 113, 0.3);
    border-radius: 3px;
    color: #2ecc71;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 9px;
    font-weight: 600;
}

.shortcuts-tip span {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
}

/* ========================================
   MODAL SOBRE (Compacto)
   ======================================== */

.about-modal-content {
    max-width: 300px;
    width: 90%;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.about-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    line-height: 1;
}

.about-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.about-modal-body {
    padding: 20px 16px 16px;
    text-align: center;
}

.about-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.about-logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary-color), #8e44ad);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.about-logo-icon i {
    font-size: 18px;
    color: #fff;
}

.about-title-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.about-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-light);
    margin: 0;
    letter-spacing: -0.5px;
    line-height: 1;
}

.version-badge {
    display: inline-block;
    padding: 2px 6px;
    background: rgba(52, 152, 219, 0.2);
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 8px;
    color: var(--primary-color);
    font-size: 9px;
    font-weight: 600;
}

.about-tagline {
    color: #666;
    font-size: 11px;
    margin: 0 0 12px 0;
}

.about-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #333, transparent);
    margin: 0 0 12px 0;
}

.about-developer {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.developer-label {
    font-size: 9px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.developer-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
}

.about-tech {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.about-tech .tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 6px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    border-radius: 4px;
    font-size: 9px;
    color: #777;
    font-weight: 500;
}

.about-tech .tech-badge i {
    font-size: 9px;
    color: var(--primary-color);
}

.about-copyright {
    font-size: 9px;
    color: #444;
}

/* ========================================
   GERENCIADOR DE PROJETOS - REDESIGN
   ======================================== */

.project-manager-modal {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.project-manager-modal.open .pm-container {
    animation: pmSlideIn 0.3s ease-out;
}

@keyframes pmSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pm-container {
    width: 95%;
    max-width: 1100px;
    max-height: 90vh;
    background: linear-gradient(180deg, #1e1e22 0%, #18181b 100%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.pm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.pm-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pm-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.pm-title-section h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: var(--text-light);
}

.pm-subtitle {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--text-muted);
}

.pm-close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pm-close:hover {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

/* Toolbar */
.pm-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
}

.pm-search-container {
    position: relative;
    flex: 1;
    min-width: 250px;
    max-width: 400px;
}

.pm-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.pm-search-input {
    width: 100%;
    padding: 10px 80px 10px 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 14px;
    transition: all 0.2s;
}

.pm-search-input:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.pm-search-input:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
}

.pm-search-input::placeholder {
    color: var(--text-muted);
}

.pm-search-hint {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 10px;
    color: var(--text-muted);
}

.pm-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pm-view-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 2px;
}

.pm-view-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 4px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.pm-view-btn:hover {
    color: var(--text-light);
}

.pm-view-btn.active {
    background: var(--primary-color);
    color: white;
}

.pm-sort-select {
    padding: 8px 32px 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-light);
    font-size: 13px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.pm-sort-select:focus {
    border-color: var(--primary-color);
}

.pm-sort-select:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
}

.pm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.pm-btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    color: white;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.pm-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.pm-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pm-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* Stats */
.pm-stats {
    display: flex;
    gap: 32px;
    padding: 16px 28px;
    background: rgba(52, 152, 219, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pm-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pm-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-light);
}

.pm-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Content */
.pm-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
}

/* Projects Grid */
.pm-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.pm-projects-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pm-projects-list .pm-project-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 16px 20px;
}

.pm-projects-list .pm-card-header {
    order: 1;
    margin-left: auto;
}

.pm-projects-list .pm-card-body {
    flex: 1;
    padding: 0;
}

.pm-projects-list .pm-card-meta,
.pm-projects-list .pm-card-footer {
    display: none;
}

/* Project Card */
.pm-project-card {
    position: relative;
    background: linear-gradient(145deg, rgba(45, 45, 48, 0.6), rgba(30, 30, 32, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.pm-project-card:hover {
    border-color: rgba(52, 152, 219, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.pm-project-card.pm-current {
    border-color: var(--primary-color);
    background: linear-gradient(145deg, rgba(52, 152, 219, 0.1), rgba(30, 30, 32, 0.8));
}

.pm-current-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary-color);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pm-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.pm-card-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.2), rgba(52, 152, 219, 0.1));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 18px;
}

.pm-card-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.pm-project-card:hover .pm-card-actions {
    opacity: 1;
}

.pm-card-action {
    width: 30px;
    height: 30px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.pm-card-action:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-light);
}

.pm-action-delete:hover {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.pm-action-edit:hover {
    background: rgba(52, 152, 219, 0.2);
    color: var(--primary-color);
}

.pm-card-body {
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 12px;
}

.pm-card-title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-light);
    line-height: 1.3;
}

.pm-card-description {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pm-card-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.pm-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 4px;
}

.pm-meta-item i {
    font-size: 10px;
}

.pm-meta-webhook {
    background: rgba(40, 167, 69, 0.15);
    color: #2ecc71;
}

.pm-meta-webhook i {
    color: #2ecc71;
}

.pm-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pm-card-date {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.pm-card-date i {
    font-size: 10px;
}

/* Empty State */
.pm-empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.pm-empty-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.pm-empty-state h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: var(--text-light);
}

.pm-empty-state p {
    margin: 0 0 24px;
    font-size: 14px;
    color: var(--text-muted);
    max-width: 300px;
}

/* Loading */
.pm-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
}

.pm-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: pmSpin 0.8s linear infinite;
}

@keyframes pmSpin {
    to { transform: rotate(360deg); }
}

.pm-loading p {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .pm-container {
        max-height: 95vh;
        border-radius: 12px 12px 0 0;
    }

    .pm-header {
        padding: 20px;
    }

    .pm-toolbar {
        padding: 12px 20px;
    }

    .pm-search-container {
        min-width: 100%;
        order: 2;
    }

    .pm-actions {
        width: 100%;
        justify-content: space-between;
    }

    .pm-stats {
        padding: 12px 20px;
        gap: 20px;
    }

    .pm-content {
        padding: 16px 20px;
    }

    .pm-projects-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile: esconder sidebar de pastas */
    .pm-sidebar {
        display: none;
    }

    .pm-main-content {
        width: 100%;
    }
}

/* ========================================
   SISTEMA DE PASTAS - PROJECT MANAGER
   ======================================== */

/* Container com sidebar */
.pm-with-sidebar {
    max-width: 1400px;
}

.pm-body-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar de Pastas */
.pm-sidebar {
    width: 260px;
    min-width: 260px;
    background: rgba(0, 0, 0, 0.2);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pm-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pm-sidebar-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.pm-sidebar-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.pm-sidebar-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Lista de Pastas */
.pm-folder-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.pm-folder-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 2px;
    position: relative;
}

.pm-folder-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.pm-folder-item.active {
    background: rgba(99, 102, 241, 0.15);
    border-left: 3px solid var(--primary-color);
    padding-left: 9px;
}

.pm-folder-item i {
    font-size: 14px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.pm-folder-item span:not(.pm-folder-count) {
    flex: 1;
    font-size: 13px;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pm-folder-count {
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.pm-folder-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 8px 4px;
}

/* Ações da Pasta (hover) */
.pm-folder-actions {
    display: none;
    gap: 4px;
    position: absolute;
    right: 8px;
}

.pm-folder-item:hover .pm-folder-actions {
    display: flex;
}

.pm-folder-item:hover .pm-folder-count {
    display: none;
}

.pm-folder-action-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.pm-folder-action-btn:hover {
    background: var(--primary-color);
    color: white;
}

.pm-folder-action-btn.pm-folder-delete:hover {
    background: #ef4444;
}

/* Estado vazio de pastas */
.pm-folder-empty {
    padding: 20px 12px;
    text-align: center;
}

.pm-folder-empty p {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.pm-folder-create-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px dashed rgba(99, 102, 241, 0.4);
    border-radius: 6px;
    color: var(--primary-color);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.pm-folder-create-btn:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: var(--primary-color);
}

/* Footer da Sidebar */
.pm-sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pm-sidebar-action {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.pm-sidebar-action:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-light);
}

/* Conteúdo Principal */
.pm-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* Breadcrumb */
.pm-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 13px;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(0, 0, 0, 0.1);
}

.pm-breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pm-breadcrumb-item i {
    font-size: 12px;
}

.pm-breadcrumb-link {
    cursor: pointer;
    transition: color 0.2s;
}

.pm-breadcrumb-link:hover {
    color: var(--primary-color);
}

.pm-breadcrumb-separator {
    font-size: 10px;
    opacity: 0.5;
}

/* Drag and Drop */
.pm-project-card.pm-dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

.pm-folder-item.pm-drag-over {
    background: rgba(99, 102, 241, 0.25) !important;
    border: 2px dashed var(--primary-color);
    padding: 8px 10px;
}

/* Modal de Pasta */
.pm-folder-modal {
    z-index: 10001;
}

.pm-folder-modal-content {
    width: 90%;
    max-width: 420px;
    background: linear-gradient(180deg, #1e1e22 0%, #18181b 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.pm-folder-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pm-folder-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.pm-folder-modal-header h3 i {
    color: var(--primary-color);
}

.pm-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pm-modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.pm-folder-modal-body {
    padding: 24px;
}

.pm-form-group {
    margin-bottom: 20px;
}

.pm-form-group:last-child {
    margin-bottom: 0;
}

.pm-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pm-form-input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 14px;
    transition: all 0.2s;
}

.pm-form-input:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.pm-form-input:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
}

.pm-form-input::placeholder {
    color: var(--text-muted);
}

/* Color Picker */
.pm-color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pm-color-option {
    width: 32px;
    height: 32px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.pm-color-option:hover {
    transform: scale(1.1);
}

.pm-color-option.active {
    border-color: white;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.pm-color-option.active::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.pm-folder-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

/* ========================================
   BUSCA GLOBAL - RESULTADOS
   ======================================== */

/* Info de resultados da busca */
.pm-search-results-info {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 12px;
    border-radius: 12px;
}

/* Badge de tipo de match no card */
.pm-search-match-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: 1px solid;
    z-index: 1;
}

.pm-search-match-badge i {
    font-size: 9px;
}

/* Detalhe do match encontrado */
.pm-match-detail {
    margin-top: 8px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pm-match-detail i {
    opacity: 0.7;
    flex-shrink: 0;
}

/* Dicas de busca no estado vazio */
.pm-search-tips {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    text-align: left;
    display: inline-block;
}

.pm-search-tips li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 13px;
    color: var(--text-muted);
}

.pm-search-tips li i {
    width: 20px;
    text-align: center;
    color: var(--primary-color);
    opacity: 0.7;
}

/* Ajuste do card quando tem badge de match */
.pm-project-card:has(.pm-search-match-badge) .pm-card-actions {
    top: 42px;
}

/* Animação de highlight para matches */
@keyframes matchHighlight {
    0% { background-color: rgba(99, 102, 241, 0.2); }
    100% { background-color: transparent; }
}

.pm-project-card.pm-match-highlight {
    animation: matchHighlight 1s ease-out;
}

/* ========================================
   SQL BUILDER - INTERFACE COMPACTA
   ======================================== */

/* Container principal do SQL Builder */
#sqlbuilder-monaco-container {
    background: var(--bg-dark);
    min-height: 200px;
}

/* Inputs de conexão inline */
#sqlbuilder-host,
#sqlbuilder-port,
#sqlbuilder-user,
#sqlbuilder-password,
#sqlbuilder-database {
    transition: border-color 0.2s, box-shadow 0.2s;
}

#sqlbuilder-host:focus,
#sqlbuilder-port:focus,
#sqlbuilder-user:focus,
#sqlbuilder-password:focus,
#sqlbuilder-database:focus {
    border-color: #9b59b6;
    box-shadow: 0 0 0 2px rgba(155, 89, 182, 0.2);
}

#sqlbuilder-host:focus-visible,
#sqlbuilder-port:focus-visible,
#sqlbuilder-user:focus-visible,
#sqlbuilder-password:focus-visible,
#sqlbuilder-database:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
}

/* Botões de tipo de banco */
input[name="sqlbuilder-db-type"] + label,
label:has(input[name="sqlbuilder-db-type"]) {
    transition: all 0.2s ease;
}

label:has(input[name="sqlbuilder-db-type"]):hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

/* Selects de templates */
#sqlbuilder-template-category,
#sqlbuilder-template-select {
    transition: border-color 0.2s;
}

#sqlbuilder-template-category:hover,
#sqlbuilder-template-select:hover {
    border-color: #666;
}

#sqlbuilder-template-category:focus,
#sqlbuilder-template-select:focus {
    border-color: #9b59b6;
}

#sqlbuilder-template-category:focus-visible,
#sqlbuilder-template-select:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
}

/* Botão de autocomplete com animação */
#sqlbuilder-autocomplete-status-mini {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 70px;
    justify-content: center;
}

/* Status bar de informações */
#sqlbuilder-autocomplete-status {
    transition: color 0.3s;
}

#sqlbuilder-autocomplete-status code {
    font-family: 'Fira Code', 'Cascadia Code', Consolas, monospace;
    font-size: 10px;
}

/* Resultado do teste */
#sqlbuilder-result table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

#sqlbuilder-result th,
#sqlbuilder-result td {
    padding: 6px 8px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

#sqlbuilder-result th {
    background: var(--bg-medium);
    font-weight: 600;
    color: var(--text-primary);
    position: sticky;
    top: 0;
}

#sqlbuilder-result td {
    color: var(--text-secondary);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#sqlbuilder-result tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

/* Botões de ação principais */
#sqlbuilder-result + div button,
.sqlbuilder-action-btn {
    transition: transform 0.15s, box-shadow 0.15s;
}

#sqlbuilder-result + div button:hover,
.sqlbuilder-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#sqlbuilder-result + div button:active,
.sqlbuilder-action-btn:active {
    transform: translateY(0);
}

/* Responsive para telas menores */
@media (max-width: 600px) {
    #sqlbuilder-host,
    #sqlbuilder-port,
    #sqlbuilder-user,
    #sqlbuilder-password,
    #sqlbuilder-database {
        width: 100% !important;
        min-width: 100% !important;
    }
}
