.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #94a3b8;
    transition: all 0.15s;
}

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

.nav-link.active {
    color: #fff;
    background: #2563eb;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #2563eb;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: background 0.15s;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: background 0.15s;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.card {
    background: #fff;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    padding: 1.5rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 1rem;
}

.stat-card {
    background: #fff;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    padding: 1.25rem;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: #0f172a;
    margin-top: 0.25rem;
}

.data-table {
    width: 100%;
    font-size: 0.875rem;
}

.data-table thead {
    background: #f8fafc;
}

.data-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 500;
    color: #64748b;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table td {
    padding: 0.875rem 1rem;
    border-top: 1px solid #f1f5f9;
}

.badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.badge-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-green {
    background: #d1fae5;
    color: #047857;
}

.badge-gray {
    background: #f1f5f9;
    color: #475569;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.375rem;
}

.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: border-color 0.15s;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-hint {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

.alert-success {
    padding: 0.75rem 1rem;
    background: #d1fae5;
    color: #047857;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.alert-error {
    padding: 0.75rem 1rem;
    background: #fee2e2;
    color: #b91c1c;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #94a3b8;
}

/* Workflow builder canvas */
.workflow-canvas-wrap {
    position: relative;
    min-height: 560px;
    height: 560px;
    background-color: #f1f5f9;
    background-image: radial-gradient(circle, #cbd5e1 1px, transparent 1px);
    background-size: 20px 20px;
    overflow: auto;
}

.workflow-canvas {
    position: relative;
    min-width: 1200px;
    min-height: 560px;
    z-index: 2;
}

.workflow-edge-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-width: 1200px;
    min-height: 560px;
    z-index: 1;
}

.wf-edge-hit {
    cursor: pointer;
}

.wf-edge-hit:hover + .wf-edge-vis,
.wf-edge-vis.wf-edge-hover {
    stroke-width: 3;
    filter: drop-shadow(0 0 2px rgba(37, 99, 235, 0.4));
}

.wf-edge-vis.wf-edge-selected {
    stroke-width: 3.5;
    filter: drop-shadow(0 0 4px rgba(37, 99, 235, 0.55));
}

.wf-edge-preview {
    stroke: #2563eb;
    stroke-width: 2;
    stroke-dasharray: 6 4;
    pointer-events: none;
}

.wf-edge-editor {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
}

.wf-edge-editor.wf-edge-editing {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.wf-edge-list-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.12s, border-color 0.12s;
}

.wf-edge-list-item:hover {
    background: #f1f5f9;
}

.wf-edge-list-item.selected {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.wf-edge-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.wf-edge-badge-default { background: #f1f5f9; color: #475569; }
.wf-edge-badge-true { background: #d1fae5; color: #047857; }
.wf-edge-badge-false { background: #fee2e2; color: #b91c1c; }

.wf-port {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 9999px;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    z-index: 4;
}

.wf-port-in {
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    background: #16a34a;
}

.wf-port-out {
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    background: #2563eb;
    cursor: crosshair;
}

.wf-node.connect-target {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.25);
}

.wf-node {
    position: absolute;
    width: 168px;
    padding: 12px 14px 16px;
    border-radius: 0.5rem;
    border: 2px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    cursor: grab;
    user-select: none;
    z-index: 3;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.wf-node:active {
    cursor: grabbing;
}

.wf-node.selected {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.wf-node.dragging {
    opacity: 0.92;
    z-index: 10;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.wf-node-type-trigger { border-left: 4px solid #64748b; }
.wf-node-type-action { border-left: 4px solid #3b82f6; }
.wf-node-type-condition { border-left: 4px solid #f59e0b; }
.wf-node-type-end { border-left: 4px solid #94a3b8; }

.palette-item {
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 0.875rem;
    cursor: grab;
    transition: background 0.15s;
}

.palette-item:hover {
    background: #f8fafc;
}

.palette-item:active {
    cursor: grabbing;
}

.palette-action { border-left: 3px solid #3b82f6; }
.palette-condition { border-left: 3px solid #f59e0b; }
.palette-end { border-left: 3px solid #94a3b8; }

.workflow-canvas-wrap.drag-over {
    outline: 2px dashed #3b82f6;
    outline-offset: -4px;
}
